CVE-2020-27304

Related Vulnerabilities: CVE-2020-27304  

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

Description

The MITRE CVE dictionary describes this issue as:

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

Additional Information

  • Bugzilla 2016640: CVE-2020-27304 civetweb: directory traversal when using the built-in HTTP form-based file upload mechanism via the mg_handle_form_request API
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • FAQ: Frequently asked questions about CVE-2020-27304