CVE-2024-44625
Description
Gogs <=0.13.0 is vulnerable to Directory Traversal via the editFilePost function of internal/route/repo/editor.go.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Gogs <=0.13.0 is vulnerable to a directory traversal in the web editor's editFilePost function, enabling authenticated remote code execution.
Vulnerability
Description
CVE-2024-44625 is a directory traversal vulnerability in Gogs, a self-hosted Git service, affecting versions up to and including 0.13.0. The flaw resides in the editFilePost function within internal/route/repo/editor.go. When a user edits a file through the web interface, the UpdateRepoFile function performs filesystem operations on a clone of the repository. The path validation is insufficient, allowing an attacker to craft filename parameters containing directory traversal sequences (e.g., ../) to write files outside the intended repository directory [1][4].
Exploitation
Prerequisites
Exploitation requires an authenticated user who has push access to a repository and can edit files via the web interface. The attacker must submit a specially crafted POST request to the /:username/:reponame/_edit/:branch/:filepath endpoint. No special network position is needed beyond normal access to the Gogs instance; a default installation is exploitable [1].
Impact
By traversing out of the repository working directory, an attacker can overwrite critical files on the server, such as Go templates, configuration files, or startup scripts. This arbitrary file write capability can be leveraged to achieve remote code execution under the context of the Gogs process, leading to full server compromise [1].
Mitigation
Status
As of the publication date, the Gogs maintainers have not acknowledged the report and no patch has been released. The vulnerability remains unpatched in the latest release (0.13.0). Users are advised to restrict access to trusted users, disable open registration, implement strong authentication, and consider migrating to Gitea, an actively maintained fork that is not affected [1].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
gogs.io/gogsGo | < 0.13.2 | 0.13.2 |
Affected products
4- Gogs/Gogsdescription
- ghsa-coords2 versions
< 0.13.2+ 1 more
- (no CPE)range: < 0.13.2
- (no CPE)range: < 0.0.20241119T173509-1.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-phm4-wf3h-pc3rghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-44625ghsaADVISORY
- fysac.github.io/posts/2024/11/unpatched-remote-code-execution-in-gogsghsaWEB
- gogs.ioghsaWEB
- pkg.go.dev/vuln/GO-2024-3275ghsaWEB
- fysac.github.io/posts/2024/11/unpatched-remote-code-execution-in-gogs/mitre
- gogs.iomitre
News mentions
0No linked articles in our index yet.