Remote file write via unsanitized upload filename
Published Oct 21, 2021 · Updated Aug 4, 2024
Directory traversal in CivetWeb 1.8 through 1.14 allows remote attackers to write files via crafted upload filenames. The mg_handle_form_request upload handler passes a client-supplied filename into the output path without sanitizing path components on non-Windows systems. Exploitation requires an application that uses the built-in form upload handler and incorporates the filename into its destination; a crafted request can write outside the intended directory and potentially affect confidentiality, integrity, and availability.
Summary
What happened
Directory traversal in CivetWeb 1.8 through 1.14 allows remote attackers to write files via crafted upload filenames. The mg_handle_form_request upload handler passes a client-supplied filename into the output path without sanitizing path components on non-Windows systems. Exploitation requires an application that uses the built-in form upload handler and incorporates the filename into its destination; a crafted request can write outside the intended directory and potentially affect confidentiality, integrity, and availability.
The record
- CVE
- CVE-2020-27304
- Published
- Oct 21, 2021
- Updated
- Aug 4, 2024
- Vendor
- CivetWeb
- Product
- CivetWeb
- Classifications
- CWE-23, CWE-22, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 21, 2021CVE publishedPublication date reported by the CVE source.
- Aug 4, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=1.8 <unspecified
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- CVE-2020-27304 RCE via Directory Traversal in CivetWeb HTTP Serverproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo