CVE-2026-102598
MediumCVSS 6.3Exploitation Probability (EPSS)
Low risk28th percentile - higher than 28% of all known CVEs
Summary
In Werkzeug before 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 an application running on Windows with NTFS serving a user-specified path ending in a special device name such as NUL:.
Risk Assessment
An attacker can cause a file read to hang indefinitely by opening the special device, leading to server thread hang and potential denial of service. This affects applications running on Windows with NTFS.
Recommendation
Update Werkzeug to version 3.1.9 or later. Avoid serving user-controlled paths in applications running on Windows with NTFS.
Other vulnerabilities in Werkzeug
See all- CVE-2023-46136High
The Werkzeug library has a vulnerability that allows for a remote denial of service attack by sending specially crafted multipart data. This affects versions 3.x prior to 3.0.1 and 2.x prior to 2.3.8.
- CVE-2025-66221Medium
Werkzeug, a comprehensive WSGI web application library, prior to version 3.1.4 allows path segments with Windows device names (e.g., CON, AUX) in its safe_join function. On Windows, a request for a path ending with such a name opens the file but reading hangs indefinitely. The issue is patched in version 3.1.4.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

