GHSA-5gjh-5j4f-cpwv is a high-severity (CVSS 8.8) Improper Input Validation vulnerability in gogs.io/gogs. 1 public exploit reference exists, so weaponization risk is real. A fix is available for gogs.io/gogs — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-5gjh-5j4f-cpwv by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 385,987 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
gogs.io/gogsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The malicious user is able to upload a crafted config file into repository's .git directory with to gain SSH access to the server. All installations with repository upload enabled (default) are affected.
Patches
Repository file uploads are prohibited to its .git directory. Users should upgrade to 0.12.6 or the latest 0.13.0+dev.
Workarounds
Disable repository files upload.
References
https://huntr.dev/bounties/b4928cfe-4110-462f-a180-6d5673797902/
For more information
If you have any questions or comments about this advisory, please post on #6833.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | gogs.io/gogs | all versions | 0.12.6go get gogs.io/gogs@v0.12.6 |
Affected Products
gogsgogsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gogs.io/gogs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update gogs.io/gogs to 0.12.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5gjh-5j4f-cpwv is resolved across your whole dependency graph.
Workarounds
Treat uploaded files as untrusted until proven otherwise: validate the actual content type rather than the supplied extension, store uploads outside the web root on a volume mounted without execute permission, and rename them to server-generated identifiers so an attacker cannot choose the path a request will later resolve.
How to detect GHSA-5gjh-5j4f-cpwv
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-5gjh-5j4f-cpwv -u https://target- Template
- Gogs <0.12.6 - Remote Command Execution
- Severity
- high
- Impact
- Successful exploitation of this vulnerability allows remote attackers to execute arbitrary commands on the target system.
- Remediation
- Fixed in version 0.12.6.
Template by ProjectDiscovery nuclei-templates (theamanrawat), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-5gjh-5j4f-cpwv in your dependencies?
Find it across Go, including transitive dependencies.