Werkzeug safe_join() allows Windows special device names
Published 5 Oct 2026 · Updated 15 Oct 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.9
- Fixed in
- 3.1.9
pip install 'werkzeug>=3.1.9'Details
Werkzeug's safe_join function allows Windows device names as filenames when they have an empty ADS marker on NTFS.
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 Windows allows special device names with an empty ADS marker, such as 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 NTFS, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely.
Is GHSA-g6x2-hccm-hh4m 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-27199 Werkzeug safe_join() allows Windows special device names · 19 Feb 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
- Linkgithub.com/pallets/werkzeug/security/advisories/GHSA-g6x2-hccm-hh4m
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-102598
- Linkgithub.com/pallets/werkzeug/pull/3309
- Linkgithub.com/pallets/werkzeug/commit/8d77320bcdf3a34941ec06dcf16b03c065cd21b6
- Packagegithub.com/pallets/werkzeug
- Linkgithub.com/pallets/werkzeug/releases/tag/3.1.9
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.