Skip to main content

Gogs CVE-2025-8110

HIGH
Path Traversal (CWE-22)
2025-12-10 9947ef80-c5d5-474a-bbab-97341a59000e
8.7
CVSS 4.0 · Vendor: 9947ef80-c5d5-474a-bbab-97341a59000e
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with repo write access
  2. Delivery
    Plant symlink via file-editor API
  3. Exploit
    Call PutContents with traversing path
  4. Execution
    Write file outside repository root
  5. Impact
    Execute code on Gogs server

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated account with write/push access to at least one repository (consistent with PR:L); the attacker then abuses the Gogs file-editor 'PutContents' API path, where the pre-patch UpdateRepoFile/GetDiffPreview logic only checked the final target for being a symlink and failed to reject symlinks anywhere in the path hierarchy, allowing a planted symlink to redirect the os.WriteFile write outside the repository working directory and achieve code execution. Limiting factors: exploitation is gated on obtaining repository write permission (not fully anonymous), and no victim user interaction is needed (UI:N). The fix (commit 553707f3) rejects any operation where hasSymlinkInPath detects a symlink in the path, so patched instances are not exploitable via this vector.

Impact

This is a genuine top-priority vulnerability, with multiple independent signals aligning rather than conflicting. CISA KEV confirms active exploitation in the wild, EPSS is 85.20% at the 100th percentile (among the most likely-to-be-exploited CVEs tracked), and a public exploit exists (Wiz Research RCE write-up plus the upstream PR). The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N, VC:H/VI:H/VA:H) with SSVC-style metrics E:A (attacked) and V:C (concentrated/confirmed) reinforces that this is weaponized, not theoretical. The one notable tension is that the NVD description labels this 'Local Execution of Code' while the CVSS vector is AV:N (network): the realistic reading is that a remote, network-reachable but authenticated user (PR:L - needs a valid account with repository write access) abuses the server-side file-editor API to achieve code execution ON the server host; the 'local' wording likely refers to the server-side code-execution outcome rather than requiring local/console access. Net: not a high-CVSS-but-low-real-risk issue - treat as emergency patching given KEV + public exploit + near-certain EPSS.

Exploit ScenarioDerived

An attacker who holds (or registers/obtains) an account with write access to a Gogs repository uses the file-editor 'PutContents' API to create or update a file along a path that passes through an attacker-planted symbolic link, causing Gogs to write attacker-controlled content to a location outside the intended repository directory and leading to code execution on the server. A public proof-of-concept and technical exploit write-up exist (Wiz Research), and CISA KEV confirms this chain is being used in the wild. The low attack complexity (AC:L) and lack of required user interaction make exploitation straightforward once write access is held.

Act Now Prioritize within 24-48h. Why: In CISA KEV with patch available.
Exploited in the wild (CISA KEV) Patch available 85.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 14, 2026

Code execution on Gogs servers is possible through improper symbolic-link handling in the repository file editor's PutContents API, which allows an authenticated user holding write/push access to at least one repository to plant a symlink and redirect file writes outside the repository working directory. The issue is confirmed actively exploited (CISA KEV), publicly available exploit code exists, and the EPSS score is 85.20% (100th percentile), placing it among the highest-priority items to patch. Exploitation requires only repository write permission - no victim interaction is needed (CVSS 3.1 vector PR:L, UI:N) - and it is rated CVSS 8.7.

RemediationAI

The primary fix is the upstream commit 553707f3fd5f68f47f531cfcff56aa3ec294c6f6 (referenced alongside GitHub PR 8078), which adds hasSymlinkInPath validation to both UpdateRepoFile and GetDiffPreview; this constitutes an upstream fix available via PR/commit, though a released patched version is not independently confirmed, so deploy the commit or an official Gogs release that demonstrably contains it and verify by checking that internal/database/repo_editor.go performs a per-component symlink check. Because exploitation is confirmed actively exploited (CISA KEV) and requires an authenticated account with write/push access to at least one repository (PR:L), the highest-value compensating control while patching is to audit and restrict repository write permissions to fully trusted users only - the trade-off being reduced collaboration and potential workflow disruption for contributors who currently hold push rights. Additionally, consider disabling or restricting access to the web file-editor/PutContents endpoint through a reverse proxy or feature flag where that is operationally acceptable, accepting loss of in-browser file editing as the cost; run the Gogs process under a dedicated low-privileged OS account inside a container or sandbox with a read-only root filesystem and write access limited to the Gogs data and repository directories, which does not remove the flaw but sharply limits where a redirected write can land and is the most effective blast-radius reduction when patching must be delayed. Monitor repositories for unexpected symlinks and watch for Gogs file-write operations targeting paths outside the repository root, and consult the vendor advisory references, the Wiz research blog, the Openwall oss-security threads from December 2025 and January 2026, and the CISA KEV catalog entry for updated guidance. Note that no vendor-released patch version number is specified in the available data; do not assume a particular release is fixed without confirming it contains commit 553707f3fd5f68f47f531cfcff56aa3ec294c6f6.

Affected Packages

go gogs.io/gogs no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-22 path traversal realized through unsafe symlink following in Gogs' Go code. The vulnerable code lives in internal/database/repo_editor.go, where UpdateRepoFile and GetDiffPreview computed a target path with path.Join(localPath, opts.NewTreeName) and then called os.WriteFile. Pre-patch logic only validated the final target with osutil.IsSymlink (and only in specific branches, e.g. new-file creation or move operations), so a symlink located anywhere earlier in the path hierarchy - a parent directory inside the repository working tree - was followed by the Go standard library, letting the write escape the repo directory and land in an attacker-chosen location such as a cron directory, SSH authorized_keys, or a configuration file loaded by the server process. The fix commit 553707f3fd5f68f47f531cfcff56aa3ec294c6f6 introduces a helper, hasSymlinkInPath(base, relPath), which splits the relative path into components and checks each progressive prefix with osutil.IsSymlink, then rejects the operation outright with "cannot update file with symbolic link in path" in both UpdateRepoFile and GetDiffPreview. The same commit also folds the previously duplicated new-file/move symlink checks into this centralized validation and tidies error handling, confirming the defect was the incomplete (leaf-only) symlink check rather than the underlying file-write primitive itself. The affected surface is the web file-editor backing API (PutContents), which is reachable over the network. Authentication requirements are confirmed as authenticated per the provided CVSS vector (PR:L).

Know when Gogs gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (9947ef80-c5d5-474a-bbab-97341a59000e) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:A/AU:Y/R:U/V:C
vuln.today AI 8.8 HIGH

Network-reachable file-editor API abused by an authenticated user with repo write access (PR:L, AC:L, UI:N); arbitrary file write yields server code execution, so C:H/I:H/A:H with unchanged scope.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (9947ef80-c5d5-474a-bbab-97341a59000e).

CVSS VectorVendor: 9947ef80-c5d5-474a-bbab-97341a59000e

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Added to CISA KEV
Oct 14, 2026 - 21:34 CISA
CVE Published
Dec 10, 2025 - 14:16 cve.org
HIGH 8.7

DescriptionCVE.org

Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code.

Executive ViewAI

Why It Matters

Gogs, a self-hosted Git service, is affected by a high-severity code execution vulnerability (CVE-2025-8110) that has been confirmed actively exploited (CISA KEV) and for which publicly available exploit code exists. An authenticated attacker with write access to any repository can exploit this flaw to execute arbitrary code on the server, potentially leading to unauthorized access to sensitive source code, intellectual property theft, or further compromise of internal systems. Security leadership should prioritize immediate patching and access reviews to mitigate organizational risk.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

Threat Score
7.3/10
Composite threat intelligence
EPSS Score
85.2%
Top 0% exploitable
Prevalence
Medium
popular open-source self-hosted Git service, moderate real-world footprint
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV Yes
Public POC Yes
EPSS 85.2%
Patch available Yes
Active threat Yes
Deciding rule
In CISA KEV with patch available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Active
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

199
Low Medium High Critical
KEV: +50
EPSS: +85
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Affected Products (CPE)CVE.org

cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*

More in Gogs

View all
CVE-2014-8682 HIGH POC
7.5 Nov 21

Multiple SQL injection vulnerabilities in Gogs (aka Go Git Service) 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta allow r

CVE-2020-15867 HIGH POC
7.2 Oct 16

The git hook feature in Gogs 0.5.5 through 0.12.2 allows for authenticated remote code execution. Rated high severity (C

CVE-2024-39932 CRITICAL POC
9.9 Jul 04

Gogs through 0.13.0 allows argument injection during the previewing of changes. Rated critical severity (CVSS 9.9), this

CVE-2024-39930 CRITICAL POC
9.9 Jul 04

The built-in SSH server of Gogs through 0.13.0 allows argument injection in internal/ssh/ssh.go, leading to remote code

CVE-2025-64111 CRITICAL POC
9.8 Feb 06

Gogs self-hosted Git service v0.13.3 has a command injection vulnerability enabling remote code execution through crafte

CVE-2026-25242 CRITICAL POC
9.8 Feb 19

Unauthenticated file upload in Gogs self-hosted Git service 0.13.4 and below. Default configuration exposes file upload

CVE-2022-1986 CRITICAL POC
9.8 Jun 09

OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9. Rated critical severity (CVSS 9.8), this vulnerabil

CVE-2018-18925 CRITICAL POC
9.8 Nov 04

Gogs 0.11.66 allows remote code execution because it does not properly validate session IDs, as demonstrated by a ".." s

CVE-2026-25921 CRITICAL POC
9.3 Mar 05

Supply chain attack via LFS object overwrite across repos in Gogs before 0.14.2. PoC and patch available.

CVE-2022-1992 CRITICAL POC
9.1 Jun 09

Path Traversal in GitHub repository gogs/gogs prior to 0.12.9. Rated critical severity (CVSS 9.1), this vulnerability is

CVE-2022-0871 CRITICAL POC
9.1 Mar 11

Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5. Rated critical severity (CVSS 9.1), this vulnerabi

CVE-2022-32174 CRITICAL POC
9.0 Oct 11

In Gogs, versions v0.6.5 through v0.12.10 are vulnerable to Stored Cross-Site Scripting (XSS) that leads to an account t

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy