{"id":"CVE-2026-27199","summary":"Werkzeug safe_join() allows Windows special device names","details":"Werkzeug is a comprehensive WSGI web application library. Versions 3.1.5 and below, the safe_join function allows Windows device names as filenames if preceded by other path segments. This was previously reported as GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact that safe_join accepts paths with multiple segments, such as example/NUL. The function send_from_directory uses safe_join to safely serve files at user-specified paths under a directory. If the application is running on Windows, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely. This issue has been fixed in version 3.1.6.","aliases":["GHSA-29vq-49wr-vm6x"],"modified":"2026-04-10T05:37:06.369932Z","published":"2026-02-21T05:15:53.335Z","related":["CGA-jg4m-jpv8-h6f8"],"database_specific":{"cwe_ids":["CWE-67"],"cna_assigner":"GitHub_M","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27199.json"},"references":[{"type":"WEB","url":"https://github.com/pallets/werkzeug/releases/tag/3.1.6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27199.json"},{"type":"ADVISORY","url":"https://github.com/pallets/werkzeug/security/advisories/GHSA-29vq-49wr-vm6x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27199"},{"type":"FIX","url":"https://github.com/pallets/werkzeug/commit/f407712fdc60a09c2b3f4fe7db557703e5d9338d"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/pallets/werkzeug","events":[{"introduced":"0"},{"fixed":"04da1b5221b7a7b57e82246e4b5741d37a6b2e56"}]}],"versions":["0.1","0.10","0.11","0.12","0.13","0.14","0.15.0","0.2","0.3","0.4","0.4.1","0.6","0.6.1","0.6.2","0.7","0.8","0.9","1.0.0","1.0.0rc1","2.0.0","2.0.0rc1","2.0.0rc2","2.0.0rc3","2.0.0rc4","2.0.0rc5","2.1.0","2.2.0","2.2.0a1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-27199.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"}]}