CVE-2025-66221
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.
Weakness
- CWE-67: Improper Handling of Windows Device Names
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2025-12-01 |
Timeline
- 2025-11-29Published by the CNA02:28 UTC
- 2025-12-01CISA SSVC decision recorded2 days after publication
- 2025-12-02GitHub advisory published (GHSA-hgf8-39gv-g3f2)3 days after publication
Exploit and advisory records
GitHub advisory GHSA-hgf8-39gv-g3f2, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI werkzeug | before 3.1.4 | 3.1.4 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| palletsprojects werkzeug | before 3.1.4fixed in 3.1.4 | 3.1.4 |
References
- https://github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13
- https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2
- https://github.com/pallets/werkzeug/releases/tag/3.1.4
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2025-66221'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2025-66221'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2025-66221'curl 'https://api.contrastcyber.com/cve_products/CVE-2025-66221'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).