Werkzeug safe_join() allows Windows special device names
Published 19 Feb 2026 · Updated 10 Sept 2026
Is your project on an affected werkzeug?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <3.1.6
- Fixed in
- 3.1.6
pip install 'werkzeug>=3.1.6'Details
Werkzeug's safe_join function allows Windows device names as filenames if when preceded by other path segments.
This 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.
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.
Is GHSA-29vq-49wr-vm6x in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected werkzeug, and gives you the command that fixes it.
More advisories for werkzeug
- MediumCVE-2026-102598Werkzeug safe_join() allows Windows special device names · 5 Oct 2026
- MediumCVE-2026-21860 Werkzeug safe_join() allows Windows special device names with compound extensions · 8 Jan 2026
- MediumCVE-2025-66221Werkzeug safe_join() allows Windows special device names · 2 Dec 2025
- MediumCVE-2024-49767Werkzeug possible resource exhaustion when parsing file data in forms · 25 Oct 2024
- MediumCVE-2024-49766Werkzeug safe_join not safe on Windows · 25 Oct 2024
- HighCVE-2024-34069Werkzeug debugger vulnerable to remote execution when interacting with attacker controlled domain · 6 May 2024
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.