CVE-2025-66221
MediumCVSS 5.3Exploitation Probability (EPSS)
Low risk42th percentile - higher than 42% of all known CVEs
Summary
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.
Risk Assessment
Applications running on Windows with Werkzeug may be hung by an attacker sending specially crafted requests, leading to a denial of service (DoS).
Recommendation
Upgrade Werkzeug to version 3.1.4, which contains a fix for this issue.
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-2026-102598Medium
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:.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

