{"id":"CVE-2026-27199","aliases":["CVE-2026-27199","GHSA-29vq-49wr-vm6x","PYSEC-2026-2320"],"related":[],"kind":"vulnerability","state":"published","title":"Werkzeug safe_join() allows Windows special device names","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Werkzeug's `safe_join` function allows Windows device names as filenames if when preceded by other path segments.\n\nThis was previously reported as https://github.com/pallets/werkzeug/security/advisories/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`.\n\n`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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Werkzeug es una completa biblioteca de aplicaciones web WSGI. Las versiones 3.1.5 e inferiores, la función safe_join permite nombres de dispositivos de Windows como nombres de archivo si van precedidos por otros segmentos de ruta. Esto fue reportado previamente como GHSA-hgf8-39gv-g3f2, pero el filtrado añadido no tuvo en cuenta el hecho de que safe_join acepta rutas con múltiples segmentos, como example/NUL. La función send_from_directory utiliza safe_join para servir archivos de forma segura en rutas especificadas por el usuario bajo un directorio. Si la aplicación se está ejecutando en Windows, y la ruta solicitada termina con un nombre de dispositivo especial, el archivo se abrirá con éxito, pero la lectura se colgará indefinidamente. Este problema ha sido solucionado en la versión 3.1.6.","source":"nvd"}],"published":"2026-02-19T20:32:45.000Z","modified":"2026-09-10T03:50:33.709Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-67"],"affected":[{"ranges":[{"version":"< 3.1.6","status":"affected"}],"vendor":"pallets","product":"werkzeug","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.6"}],"ecosystem":"PyPI","package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.6"}],"vendor":"palletsprojects","product":"werkzeug","cpe":"cpe:2.3:a:palletsprojects:werkzeug:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.6"}],"ecosystem":"PyPI","package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"pysec"}],"references":[{"url":"https://github.com/pallets/werkzeug/security/advisories/GHSA-29vq-49wr-vm6x","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pallets/werkzeug/commit/f407712fdc60a09c2b3f4fe7db557703e5d9338d","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pallets/werkzeug/releases/tag/3.1.6","tags":["advisory","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27199","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pallets/werkzeug","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-24T19:02:05.165Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27199","url":"https://www.cve.org/CVERecord?id=CVE-2026-27199","licence":"CVE Terms of Use","modified":"2026-02-24T19:02:19.689Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-29vq-49wr-vm6x","url":"https://github.com/advisories/GHSA-29vq-49wr-vm6x","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.709Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27199","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27199","licence":"Public domain","modified":"2026-06-17T10:26:50.207Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2320","url":"https://osv.dev/vulnerability/PYSEC-2026-2320","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:48.093Z"}],"updatedAt":"2026-11-25T22:59:14.600Z","epss":{"score":0.00647,"percentile":0.45677,"date":"2026-11-30T12:00:22.000Z"}}