CVE-2026-27199 in Palletsprojects Werkzeug
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 pa...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no integrity impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Palletsprojects | Werkzeug | < 3.1.6 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-27199 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-075555-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Published | 2026-02-21 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-67: CWE-67
Analysis AI-written, not human-reviewed
CVE-2026-27199 affects Werkzeug versions 3.1.5 and below, where the safe_join function improperly handles Windows device names as filenames, potentially leading to unauthorized access or other security issues.
An attacker can exploit this vulnerability by crafting a specific path that includes a Windows device name (e.g., NUL, CON, PRN) as a filename, which the safe_join function fails to properly sanitize. This could allow the attacker to access or manipulate files in unexpected ways.
Questions
What is CVE-2026-27199?
CVE-2026-27199 affects Werkzeug versions 3.1.5 and below, where the safe_join function improperly handles Windows device names as filenames, potentially leading to unauthorized access or other security issues.
What is the CVSS score for CVE-2026-27199?
CVE-2026-27199 has CVSS 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. EPSS: 0.6%.
Is CVE-2026-27199 actively exploited?
No confirmed active exploitation of CVE-2026-27199 as of 2026-09-25.
How do I remediate CVE-2026-27199?
Priority: HIGH. PSIRT: [email protected]
What systems are affected by CVE-2026-27199?
CVE-2026-27199 affects Palletsprojects Werkzeug.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Palletsprojects","product":"Werkzeug","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.