Authenticated code execution via symlink-following file write
Published Nov 15, 2024 · Updated Nov 20, 2024
Path traversal in Gogs 0.13.0 and earlier allows remote authenticated users to execute code through the repository web editor. An early exit in editFilePost skips its symlink check for a renamed nonexistent path, after which UpdateRepoFile uses os.WriteFile and follows the link outside the clone. A default installation is exposed when an account can push to a repository and edit its files, allowing a server-side Git hook to be overwritten and executed.
Summary
What happened
Path traversal in Gogs 0.13.0 and earlier allows remote authenticated users to execute code through the repository web editor. An early exit in editFilePost skips its symlink check for a renamed nonexistent path, after which UpdateRepoFile uses os.WriteFile and follows the link outside the clone. A default installation is exposed when an account can push to a repository and edit its files, allowing a server-side Git hook to be overwritten and executed.
The record
- CVE
- CVE-2024-44625
- Published
- Nov 15, 2024
- Updated
- Nov 20, 2024
- Vendor
- Gogs
- Product
- Gogs
- Classifications
- CWE-22, T1190
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Nov 15, 2024CVE publishedPublication date reported by the CVE source.
- Nov 20, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=0.13.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Fysac CVE-2024-44625 proof-of-conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo