CVE-2026-27199 Details
Description
Werkzeug is a comprehensive WSGI web application library. Versions 3.1.5 and below, the safe_join function allows Windows device names as filenames if preceded by other path segments. This was previously reported as GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact that safe_join accepts paths with multiple segments, such as example/NUL. The function 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 fixed in version 3.1.6.
A vulnerability exists in Werkzeug versions prior to 3.1.6 within the safe_join function, which improperly allows Windows special device names as filenames if preceded by other path segments. This issue arises because safe_join can handle multi-segment paths, such as 'example/NUL'. The vulnerability is exploited when the send_from_directory function, which relies on safe_join to serve files from user-specified paths, is used on a Windows system. If the requested path ends with a device name, the file will be opened, but the read operation will hang indefinitely.
Users can upgrade to Werkzeug version 3.1.6 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 24, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-67 | Improper Handling of Windows Device Names | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| palletsprojects werkzeug | < 3.1.6 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 3, 2026 | Initial Analysis | [email protected] |
| Feb 21, 2026 | New CVE Received | [email protected] |