{"id":"CVE-2025-66221","published":"2025-11-29T02:28:34Z","modified":"2025-12-01T15:35:25Z","title":"Werkzeug safe_join() allows Windows special device names","vendor":"pallets","product":"werkzeug","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00547,"percentile":0.46774,"provenance":"source"},"cwes":[{"id":"CWE-67","name":"Improper Handling of Windows Device Names"}],"references":[{"url":"https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13","tags":["x_refsource_MISC"]},{"url":"https://github.com/pallets/werkzeug/releases/tag/3.1.4","tags":["x_refsource_MISC"]}],"priority":{"score":13.8,"factors":[{"name":"EPSS percentile","points":9.35},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"pallets","affectedVersions":[{"vendor":"pallets","product":"werkzeug","versions":["< 3.1.4"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-12-01T15:35:05.219216Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"werkzeug","vulnerableRanges":["<3.1.4"],"patched":["3.1.4"],"from":["GHSA-hgf8-39gv-g3f2","PYSEC-2026-2046"],"provenance":"source"}],"summary":{"text":"Werkzeug's safe_join() function, which send_from_directory() relies on to serve files from user-specified paths, fails to reject Windows special device names such as CON and AUX in path segments. An unauthenticated remote attacker can exploit this without user interaction, under the conditions that the application runs on Windows and a requested path ends with such a device name, causing file reads to hang indefinitely.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:44:22Z"},"euvd":{"id":"EUVD-2025-199893","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pallets-werkzeug-cve-2025-66221","packageHistory":[{"cve":"CVE-2019-14806","published":"2019-08-09","fixed":"0.15.3","kev":false},{"cve":"CVE-2019-14322","published":"2019-07-28","fixed":"0.15.5","kev":false},{"cve":"CVE-2022-29361","published":"2022-05-24","fixed":"2.1.1","kev":false},{"cve":"CVE-2025-66221","published":"2025-11-29","fixed":"3.1.4","kev":false},{"cve":"CVE-2026-27199","published":"2026-02-21","fixed":"3.1.6","kev":false,"link":{"from":"CVE-2025-66221","to":"CVE-2026-27199","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:werkzeug","fromFixed":"3.1.4","toFixed":"3.1.6","daysApart":84},{"kind":"similar","provenance":"machine","score":0.56,"basis":"same product + CWE + description similarity"}]}}],"package":"PyPI:werkzeug"}}