Arbitrary file write in Gogs PutContents API leading to SSH access
CVE-2024-55947 affects Gogs, the self-hosted Git service. According to the provided content, the flaw is in the PutContents/file update API and allows a malicious user to write a file to an arbitrary path on the server. Supporting context characterizes the issue as a path traversal flaw in the Gogs file update API that permits writes outside the intended repository boundary. This arbitrary file write can be used to place attacker-controlled content into sensitive locations on the host, ultimately enabling the attacker to gain SSH access to the server. The issue was fixed in Gogs version 0.13.1.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
Repository contains two files: a README describing CVE-2025-8110 and a single Python exploit implementation (exploit.py). The exploit targets Gogs <= 0.13.3 and abuses the PutContents API path validation weakness by first committing a symlink into an attacker-controlled repository and then using the API to write through that symlink to an arbitrary server-side file. The code is a standalone Python CLI tool, not tied to a major exploitation framework. Based on the visible code and README, its workflow is: normalize target URL, create a requests session, optionally verify the target is Gogs/vulnerable, authenticate, create a repository, push a symlink via local git operations, invoke the vulnerable /api/v1/repos/.../contents/... endpoint, then optionally trigger execution depending on the selected strategy. Supported capabilities include check-only detection, arbitrary file write, SSH authorized_keys planting, cron-based reverse shell setup, .git/config sshCommand poisoning, and Git hook overwrite/triggering. The script also supports cleanup, JSON-style reporting, proxying, SSL verification control, and configurable timeout/output. Fingerprintable targets include the Gogs REST API prefix /api/v1 and sensitive filesystem paths such as /root/.ssh/authorized_keys, /etc/crontab, .git/config, and hooks/pre-receive. Overall, this is an operational authenticated web exploit that escalates a repository content-write primitive into arbitrary file overwrite and practical RCE on misconfigured or root-running Gogs deployments.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
17 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An earlier Gogs vulnerability (described as a direct path traversal technique) whose patch/mitigation is bypassed by CVE-2025-8110 via symlink handling weaknesses.
An earlier vulnerability in Gogs PutContentsAPI that CVE-2025-8110 is described as bypassing; specific impact details are not provided in the content beyond its relationship to the newer bypass flaw.
A prior Gogs vulnerability referenced as having protections that can be bypassed by CVE-2025-8110; specific technical details of CVE-2024-55947 are not provided in the content beyond being a related earlier issue.
An earlier Gogs vulnerability referenced as having protections that CVE-2025-8110 can bypass; specific technical details are not provided in the content.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.