Werkzeug safe_join() allows Windows special device names
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.
- Published
- Nov 28, 2025
- Updated
- Jun 17, 2026
- EPSS
- 0.5% · 41th percentile
- CWE
- CWE-67
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
25
Monitor
Low priority for now.
- CVSS
- 25 / 40 · 6.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.5%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · GitHub_M
- 6.3
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| palletsprojects | werkzeug | cpe:2.3:a:palletsprojects:werkzeug |
| microsoft | windows | cpe:2.3:o:microsoft:windows |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- palletsprojects werkzeugbefore 3.1.4
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
pallets werkzeug
- < 3.1.4affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.24 | py3-werkzeug | before 3.1.4-r0 | 3.1.4-r0 |
| openSUSE:Tumbleweed | python-openapi-core | before 0.22.0-1.1 | 0.22.0-1.1 |
| PyPI | werkzeug | before 3.1.4 | 3.1.4 |
Same product
palletsprojects: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-14322In Pallets Werkzeug before 0.15.5, SharedDataMiddleware mishandles drive names (such as C:) in Windows pathnames.47Plan
- CVE-2022-29361Improper parsing of HTTP requests in Pallets Werkzeug v2.1.0 and below allows attackers to perform HTTP Request Smuggling using a crafted HT41Plan
- CVE-2024-34069Werkzeug's improper usage of a pathname and improper CSRF protection results in the remote command execution31Monitor
- CVE-2019-14806Pallets Werkzeug before 0.15.3, when used with Docker, has insufficient debugger PIN randomness because Docker containers share the same mac31Monitor
- CVE-2023-46136Werkzeug vulnerable to high resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning30Monitor
- CVE-2023-25577Werkzeug may allow high resource usage when parsing multipart form data with many fields30Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| pallets werkzeug | 3.1.4 · description | Vendor (CNA) |
| alpine:py3-werkzeug | 3.1.4-r0 · Alpine:v3.24 | Package registry (OSV) |
| opensuse:python-openapi-core | 0.22.0-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| PyPI:werkzeug | 3.1.4 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-2186041 days apartWerkzeug safe_join() allows Windows special device names with compound extensions25Monitor
- CVE-2026-2719985 days apartWerkzeug safe_join() allows Windows special device names25Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-67 · Improper Handling of Windows Device NamesCVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13
- github.com/pallets/werkzeug/releases/tag/3.1.4
- github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2
Vendor advisories and official records. Exploit/PoC links are deliberately left out.