CVE-2018-20303 Gogs Directory Traversal
An attacker can exploit a directory traversal flaw in Gogs to create arbitrary files on the server via the file-upload functionality.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-20303?
CVE-2018-20303 is a high-severity path traversal vulnerability in n/a, published on 20 Dec 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-22
Which versions are affected by CVE-2018-20303?
2 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gogs.io/gogs Go | All versions | 0.11.80-0.20181218063808-ff93d9dbda5c |
gogs.io/gogs Go | All versions | 0.11.80-0.20181218063808-ff93d9dbda5c |
Products include Gogs Gogs.
How do I fix CVE-2018-20303?
Upgrade gogs.io/gogs to 0.11.80-0.20181218063808-ff93d9dbda5c or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2018-20303 being exploited?
There is no known exploitation of CVE-2018-20303 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-9hxg-w7qf-hh93.