{"id":"CVE-2025-66221","aliases":["CVE-2025-66221","GHSA-hgf8-39gv-g3f2","PYSEC-2026-2046"],"related":[],"kind":"vulnerability","state":"published","title":"Werkzeug safe_join() allows Windows special device names","summary":"Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.4, Werkzeug's safe_join function allows path segments with Windows device names. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. 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 patched in version 3.1.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.4, Werkzeug's safe_join function allows path segments with Windows device names. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. 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 patched in version 3.1.4.","source":"cvelist"},{"lang":"en","text":"Werkzeug's `safe_join` function allows path segments with Windows device names. On Windows, there are special device names such as `CON`, `AUX`, etc that are implicitly present and readable in every directory. `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. Antes de la versión 3.1.4, la función safe_join de Werkzeug permite segmentos de ruta con nombres de dispositivos de Windows. En Windows, existen nombres de dispositivos especiales como CON, AUX, etc. que están implícitamente presentes y son legibles en cada directorio. 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á correctamente, pero la lectura se colgará indefinidamente. Este problema ha sido parcheado en la versión 3.1.4.","source":"nvd"}],"published":"2025-11-29T02:28:34.524Z","modified":"2026-10-07T20:10:01.970Z","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: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"}],"cwes":["CWE-67"],"affected":[{"ranges":[{"version":"< 3.1.4","status":"affected"}],"vendor":"pallets","product":"werkzeug","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.4"}],"ecosystem":"PyPI","package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.4"}],"vendor":"palletsprojects","product":"werkzeug","cpe":"cpe:2.3:a:palletsprojects:werkzeug:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.4"}],"ecosystem":"PyPI","package":"werkzeug","purl":"pkg:pypi/werkzeug","source":"pysec"}],"references":[{"url":"https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pallets/werkzeug/releases/tag/3.1.4","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66221","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pallets/werkzeug","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/werkzeug","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-hgf8-39gv-g3f2","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-12-01T15:35:05.219Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66221","url":"https://www.cve.org/CVERecord?id=CVE-2025-66221","licence":"CVE Terms of Use","modified":"2025-12-01T15:35:25.271Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hgf8-39gv-g3f2","url":"https://github.com/advisories/GHSA-hgf8-39gv-g3f2","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:31.900Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66221","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66221","licence":"Public domain","modified":"2026-10-07T20:10:01.970Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2046","url":"https://osv.dev/vulnerability/PYSEC-2026-2046","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:56.418Z"}],"updatedAt":"2026-11-25T22:59:08.093Z","epss":{"score":0.00547,"percentile":0.47276,"date":"2026-12-01T12:00:22.000Z"}}