Impact
Werkzeug’s safe_join function was designed to prevent directory traversal by sanitizing file paths. In versions up to 3.1.5, the function fails to block Windows device names when the path contains multiple segments, such as example/NUL. When a user requests such a path through the send_from_directory helper, the function opens the special device file successfully, but attempts to read from it hang indefinitely. The hanging operation consumes server resources and blocks the request, resulting in a denial‑of‑service condition for the affected application. No information is provided about data exfiltration or code execution, so the primary consequence is a service outage.
Affected Systems
The vulnerability affects the Werkzeug library, managed by the pallets project. Versions 3.1.5 and earlier are impacted; the issue is fixed in 3.1.6. Applications running on Windows that use Werkzeug’s send_from_directory to serve user‑specified file paths are potentially exposed.
Risk and Exploitability
The CVSS score of 6.3 indicates a moderate severity. The EPSS score of < 1% suggests a very low likelihood of exploitation at present, and the vulnerability is not listed in the CISA KEV catalog. The exploit requires that the attacker can issue a request to a Werkzeug application running on Windows and that the application uses send_from_directory to serve files. The attack vector is therefore inferred to be remote, over a network or HTTP interface, allowing an adversary to trigger the hang by providing a path ending with a Windows device name such as NUL. Successful exploitation leads to a DoS of the application for the target user, but does not compromise confidentiality or integrity.
OpenCVE Enrichment
Github GHSA