# CVE-2025-8110: Gogs Path Traversal

> Attackers can overwrite arbitrary files via symbolic links in the PutContents API, leading to local code execution on Gogs servers.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Yes, since 12 Jan 2026 (CISA KEV)
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Dec 2025
- **Updated:** 26 Feb 2026
- **Also known as:** GHSA-mq8m-42gh-wq7r, GO-2025-4225

## What is CVE-2025-8110?

CVE-2025-8110 is a high-severity path traversal vulnerability in Gogs, published on 10 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-8110?

3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gogs.io/gogs` | Go | All versions | None |
| `gogs.io/gogs` | Go | All versions to 0.13.3 | None |
| `gogs.io/gogs` | Go | All versions to 0.13.3 | None |

Products: Gogs Gogs.

## How do I fix CVE-2025-8110?

Upgrade to a fixed version. US federal agencies must fix it by 2 Feb 2026.

## Is CVE-2025-8110 being exploited?

Yes. Attackers have exploited CVE-2025-8110 in the wild since at least 12 Jan 2026.

Public exploit code:

- CVE-2025-8110 PoC (github_poc): https://github.com/zAbuQasem/gogs-CVE-2025-8110
- Detection template for CVE-2025-8110 (github_poc): https://github.com/rxerium/CVE-2025-8110
- https://github.com/Ghxstsec/CVE-2025-8110 (github_poc): https://github.com/Ghxstsec/CVE-2025-8110
- PoC exploit for CVE-2025-8110 (github_poc): https://github.com/joaquinrrr/CVE-2025-8110
- GOGS RCE cve-2025-8110 python script that automates the whole attack chain of creating a repository with a symlink file pointing to .git/config and then triggering rce via a poisoned sshCommand on the config file. (github_poc): https://github.com/kayl22/cve-2025-8110-GOGS-RCE
- PoC for CVE-2025-8110 - Gogs arbitrary file write via symlink (github_poc): https://github.com/Shirouuu/CVE-2025-8110-gogs-poc

## Other vulnerabilities in Gogs

- [CVE-2024-56731](https://insights.sbomify.com/CVE-2024-56731/): Gogs deletion of internal files allows remote command execution (critical 10.0)
- [CVE-2022-1884](https://insights.sbomify.com/CVE-2022-1884/): Remote Command Execution in gogs/gogs (critical 10.0)
- [CVE-2022-1986](https://insights.sbomify.com/CVE-2022-1986/): OS Command Injection in gogs/gogs (critical 10.0)
- [CVE-2022-1992](https://insights.sbomify.com/CVE-2022-1992/): Path Traversal in gogs/gogs (critical 10.0)
- [CVE-2024-39930](https://insights.sbomify.com/CVE-2024-39930/): Duplicate Advisory: github.com/gogs/gogs affected by CVE-2024-39930 (critical 9.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-8110 and fix it if it is affected.

What it is: CVE-2025-8110 is a high-severity path traversal vulnerability in Gogs, published on 10 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2025-8110 in the wild since at least 12 Jan 2026.

Affected packages and fixed versions:
- gogs.io/gogs (Go): affected all versions; no fix listed
- gogs.io/gogs (Go): affected all versions up to 0.13.3; no fix listed
- gogs.io/gogs (Go): affected all versions up to 0.13.3; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-8110/ (Markdown: https://insights.sbomify.com/CVE-2025-8110/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-8110
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-8110
- OSV: https://osv.dev/vulnerability/CVE-2025-8110

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-8110/
Summaries are generated and may contain mistakes; the official description above is the record.
