CVE-2020-27304: civetweb_project civetweb Relative Path Traversal
Vulnerability summary
CVE-2020-27304 is a critical (CVSS 9.8) Relative Path Traversal vulnerability in civetweb_project civetweb. EPSS estimates a 3.27% chance of exploitation in the next 30 days, higher than 88.7% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Timeline
- 21-10-2021PublishedVulnerability first disclosed.
- 04-08-2024Last modifiedVulnerability information updated.
Description
The CivetWeb web library does not validate uploaded filepaths when running on an OS other than Windows, when using the built-in HTTP form-based file upload mechanism, via the mg_handle_form_request API. Web applications that use the file upload form handler, and use parts of the user-controlled filename in the output path, are susceptible to directory traversal
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
3.27%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
No change 0.00 pp
From 3.27% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (jfrog.com)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-23Relative Path TraversalThe product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
- CWE-22Improper Limitation of a Pathname to a Restricted DirectoryThe 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.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Civetweb_project1 product
- civetweb≥ 1.8, < unspecified | ≥ 1.8, < 1.15
Debian1 product
- civetweb< 1.15+dfsg-1
Opensuse1 product
- civetweb&distro=openSUSE Leap 15.2< 1.15-lp152.2.3.1
Siemens1 product
Ubuntu1 product
- civetwebAll versions (No fix recorded)
5 vendors · 5 products
References
11 links- jfrog.com/blog/cve-2020-27304-rce-via-directory-traversal-in-civetweb-http-server/X Refsource MISCExploitThird Party Advisory
- cert-portal.siemens.com/productcert/pdf/ssa-222547.pdfX Refsource CONFIRM
- lists.opensuse.org/archives/…Advisory