Vulnerability · Published Sep 29, 2026 · Assigned by GitHub_M
CVE-2026-102598Werkzeug safe_join() allows Windows special device names
Medium 6.3
In plain English
A medium-severity security flaw in werkzeug from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Werkzeug is a comprehensive WSGI web application library. Prior to 3.1.9, the safe_join function used by send_from_directory can allow a NUL: special-device path because safe_join checks the Windows device name without first removing an empty NTFS ADS marker. The trigger is that an application runs on Windows with NTFS and serves a user-specified path ending in a special device name such as NUL:. The attack mechanism is that a requested path ends in a Windows special device name with an empty ADS marker. The impact is that the special device opens successfully and the file read hangs indefinitely. This issue is fixed in version 3.1.9.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | werkzeug | 3.1.9 | GHSA-g6x2-hccm-hh4m |
| PyPI | werkzeug | 3.1.9 | PYSEC-2026-4312 |
| Ubuntu:22.04:LTS | python-werkzeug | no fix listed | UBUNTU-CVE-2026-102598 |
| Ubuntu:24.04:LTS | python-werkzeug | no fix listed | UBUNTU-CVE-2026-102598 |
| Ubuntu:26.04:LTS | python-werkzeug | no fix listed | UBUNTU-CVE-2026-102598 |
| Ubuntu:26.10 | python-werkzeug | no fix listed | UBUNTU-CVE-2026-102598 |
Affected products (as reported)
Weakness: CWE-67 · 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
References
- https://github.com/pallets/werkzeug/security/advisories/GHSA-g6x2-hccm-hh4m x_refsource_CONFIRM
- https://github.com/pallets/werkzeug/pull/3309 x_refsource_MISC
- https://github.com/pallets/werkzeug/commit/8d77320bcdf3a34941ec06dcf16b03c065cd21b6 x_refsource_MISC
- https://github.com/pallets/werkzeug/releases/tag/3.1.9 x_refsource_MISC