Vulnerability Details : CVE-2018-20303
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.
Vulnerability category: Directory traversal
Exploit prediction scoring system (EPSS) score for CVE-2018-20303
Probability of exploitation activity in the next 30 days: 0.14%
Percentile, the proportion of vulnerabilities that are scored at or less: ~ 50 % EPSS Score History EPSS FAQ
CVSS scores for CVE-2018-20303
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source |
---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:P/A:N |
10.0
|
2.9
|
NIST |
7.5
|
HIGH | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
3.9
|
3.6
|
NIST |
CWE ids for CVE-2018-20303
-
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.Assigned by: nvd@nist.gov (Primary)
References for CVE-2018-20303
-
https://github.com/gogs/gogs/issues/5558
Remote Code execution or|and Denial of Service · Issue #5558 · gogs/gogs · GitHubIssue Tracking;Patch;Third Party Advisory
-
https://github.com/gogs/gogs/commit/ff93d9dbda5cebe90d86e4b7dfb2c6b8642970ce
pkg/tool: improve SanitizePath (#5558) · gogs/gogs@ff93d9d · GitHubPatch;Third Party Advisory
-
https://pentesterlab.com/exercises/cve-2018-18925/
PentesterLab: Learn Web App Pentesting!Exploit;Third Party Advisory
Products affected by CVE-2018-20303
- cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*