CVE-2025-66221 in Palletsprojects Werkzeug and 1 more product
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_j...
Affects 2 products from 2 vendors. 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.4 |
Platforms listed by the source (the vulnerable product runs on these; they are not themselves vulnerable): Microsoft Windows
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. 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2025-66221 |
|---|---|
| BreachSpider ID | BS-2025-GLOBAL-028645-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Published | 2025-11-29 |
| Last modified | 2026-10-07 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-67: CWE-67
Analysis AI-written, not human-reviewed
CVE-2025-66221 affects Werkzeug versions prior to 3.1.4, where the safe_join function does not properly handle path segments with Windows device names, allowing for potential path traversal attacks.
An attacker can exploit this vulnerability by crafting a request to access files outside the intended directory on a Windows system, using special device names like CON, AUX, etc.
Questions
What is CVE-2025-66221?
CVE-2025-66221 affects Werkzeug versions prior to 3.1.4, where the safe_join function does not properly handle path segments with Windows device names, allowing for potential path traversal attacks.
What is the CVSS score for CVE-2025-66221?
CVE-2025-66221 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.7%.
Is CVE-2025-66221 actively exploited?
No confirmed active exploitation of CVE-2025-66221 as of 2026-10-08.
How do I remediate CVE-2025-66221?
Priority: MEDIUM. PSIRT: [email protected]
What systems are affected by CVE-2025-66221?
CVE-2025-66221 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-10-07.