CVE-2018-20303 is a high-severity (CVSS 7.5) Path Traversal vulnerability in gogs.io/gogs. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for gogs.io/gogs — see the affected versions and patch details below.
Gogs Directory Traversal
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
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
In pkg/tool/path.go in Gogs before 0.11.82.1218, a directory traversal in the file-upload functionality can allow an attacker to create a file under data/sessions on the server, a similar issue to CVE-2018-18925.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | gogs.io/gogs | all versions | 0.11.80-0.20181218063808-ff93d9dbda5cgo get gogs.io/gogs@v0.11.80-0.20181218063808-ff93d9dbda5c |
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.11.80-0.20181218063808-ff93d9dbda5c or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-20303 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2018-20303 in your dependencies?
Find it across Go, including transitive dependencies.