{"id":"CVE-2020-27304","aliases":["AZL-39076","DEBIAN-CVE-2020-27304","EUVD-2020-19817","GHSA-wphm-mh7c-38cf","UBUNTU-CVE-2020-27304","openSUSE-SU-2021:1424-1"],"status":"published","title":"The CivetWeb web library does not validate uploaded filepaths when running on an OS other than...","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","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.03268,"percentile":0.885,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22","CWE-23"],"published":"2021-10-21T15:42:23Z","modified":"2026-10-26T12:02:42Z","fixes":[{"ecosystem":"Azure Linux:3","package":"ceph","fixed_in":["18.2.1-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"civetweb","fixed_in":["1.15+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"civetweb","fixed_in":["1.15+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"civetweb","fixed_in":["1.15+dfsg-1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.2","package":"civetweb","fixed_in":["1.15-lp152.2.3.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:3","package":"ceph","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"18.2.1-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"civetweb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.15+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"civetweb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.15+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"civetweb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.15+dfsg-1"}]}]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"civetweb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.16+dfsg-2"]},{"source":"osv","ecosystem":"openSUSE:Leap 15.2","package":"civetweb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.15-lp152.2.3.1"}]}]}],"products":[{"vendor":"civetweb","product":"civetweb"},{"vendor":"civetweb_project","product":"civetweb"},{"vendor":"siemens","product":"sinec_infrastructure_network_services"}],"references":[{"url":"https://jfrog.com/blog/cve-2020-27304-rce-via-directory-traversal-in-civetweb-http-server/","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://groups.google.com/g/civetweb/c/yPBxNXdGgJQ","tags":["x_refsource_MISC","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-27304","tags":["web"]},{"url":"https://github.com/advisories/GHSA-wphm-mh7c-38cf"},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-27304","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2020-27304","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-27304","tags":["report"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/YJTZUANR73SYTZDQ6GMWGRR5O4MCEJA4/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1191938","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2020-27304","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2020-27304","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","status":"published","published":"2021-10-21T15:42:23Z","modified":"2024-08-04T16:11:36.691Z","cwes":["CWE-23"],"updated_at":"2026-11-02T14:35:53.236501Z"}],"euvd":[{"id":"EUVD-2020-19817","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","status":"published","published":"2021-10-21T15:42:23Z","modified":"2024-08-04T16:11:36Z","updated_at":"2026-11-03T03:07:12.940476Z"}],"ghsa":[{"id":"GHSA-wphm-mh7c-38cf","title":"The CivetWeb web library does not validate uploaded filepaths when running on an OS other than...","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","status":"published","published":"2022-05-24T19:18:28Z","modified":"2023-01-27T05:03:01Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:42:09.126228Z"}],"nvd":[{"id":"CVE-2020-27304","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","status":"published","published":"2021-10-21T16:15:07.737Z","modified":"2026-06-17T03:09:08.483Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-23","CWE-22"],"updated_at":"2026-11-02T14:06:45.704484Z"}],"osv":[{"id":"AZL-39076","title":"CVE-2020-27304 affecting package ceph for versions less than 18.2.1-1","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","status":"published","published":"2021-10-21T16:15:07Z","modified":"2026-04-21T04:54:45.013731Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:28:04.608733Z"},{"id":"CVE-2020-27304","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","status":"published","published":"2021-10-21T16:15:07.737Z","modified":"2026-10-24T10:30:31.088480494Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:16.248747Z"},{"id":"DEBIAN-CVE-2020-27304","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","status":"published","published":"2021-10-21T16:15:07.737Z","modified":"2026-10-26T12:02:42.518961967Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:33.729655Z"},{"id":"UBUNTU-CVE-2020-27304","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","status":"published","published":"2021-10-21T16:15:00Z","modified":"2026-09-07T03:45:02.804606687Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:24.541803Z"},{"id":"openSUSE-SU-2021:1424-1","title":"Security update for civetweb","description":"This update for civetweb fixes the following issues:\n\nVersion 1.15:\n\n* boo#1191938 / CVE-2020-27304: missing uploaded filepath validation in the default form-based file upload mechanism\n* New configuration for URL decoding\n* Sanitize filenames in handle form\n* Example “embedded_c.c”: Do not overwrite files (possible security issue)\n* Remove obsolete examples\n* Remove “experimental” label for some features\n* Remove MG_LEGACY_INTERFACE that have been declared obsolete in 2017 or earlier\n* Modifications to build scripts, required due to changes in the test environment\n* Unix domain socket support fixed\n* Fixes for NO_SSL_DL\n* Fixes for some warnings / static code analysis\n\nVersion 1.14:\n\n* Change SSL default setting to use TLS 1.2 as minimum (set config if you need an earlier version)\n* Add local_uri_raw field (not sanitized URI) to request_info\n* Additional API functions and a callback after closing connections\n* Allow mbedTLS as OpenSSL alternative (basic functionality)\n* Add OpenSSL 3.0 support (OpenSSL 3.0 Alpha 13)\n* Support UNIX/Linux domain sockets\n* Fuzz tests and ossfuzz integration\n* Compression for websockets\n* Restructure some source files\n* Improve documentation\n* Fix HTTP range requests\n* Add some functions for Lua scripts/LSP\n* Build system specific fixes (CMake, MinGW)\n* Update 3rd party components (Lua, lfs, sqlite)\n* Allow Lua background script to use timers, format and filter logs\n* Remove WinCE code\n* Update version number \n\nVersion 1.13:\n\n* Add arguments for CGI interpreters\n* Support multiple CGi interpreters\n* Buffering HTTP response headers, including API functions mg_response_header_* in C and Lua\n* Additional C API functions\n* Fix some memory leaks\n* Extended use of atomic operations (e.g., for server stats)\n* Add fuzz tests\n* Set OpenSSL 1.1 API as default (from 1.0)\n* Add Lua 5.4 support and deprecate Lua 5.1\n* Provide additional Lua API functions\n* Fix Lua websocket memory leak when closing the server\n* Remove obsolete 'file in memory' implementation\n* Improvements and fixes in documentation\n* Fixes from static source code analysis\n* Additional unit tests\n* Various small bug fixes\n* Experimental support for some HTTP2 features (not ready for production)\n* Experimental support for websocket compression\n* Remove legacy interfaces declared obsolete since more than 3 years\n\nVersion 1.12 \n\n* See https://github.com/civetweb/civetweb/releases/tag/v1.12 for detailed changelog\n  \n","status":"published","published":"2021-10-31T15:08:27Z","modified":"2026-02-04T02:40:18.362132Z","updated_at":"2026-11-02T16:58:32.266854Z"}]}}
