CVE-2025-66221: Werkzeug safe_join() allows Windows special device names
Affects werkzeugSource GCVE Database
Not known to be exploited · CVSS 6.3 Medium : upgrade to 3.1.4 when convenient.
Data as of 21 Nov 2026, 03:45 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 6.3 |
|---|
- Patch
- Available – fixed in 3.1.4
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 20 Nov 2026.
What to do
Upgrade werkzeug to 3.1.4.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIwerkzeug | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Werkzeug to version 3.1.4 or later, where this issue is fixed. No other mitigation is required as the patch addresses the vulnerability directly.
Description
Werkzeug's safe_join function improperly allows Windows special device names such as CON and AUX as path segments. On Windows systems, these device names exist implicitly in every directory. When used with send_from_directory, a request ending with a special device name will open the file but cause the read operation to hang indefinitely. This affects Werkzeug versions prior to 3.1.4.
References
- github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-66221 (opens in a new tab)
- github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13 (opens in a new tab)
- github.com/pallets/werkzeug (opens in a new tab)
- github.com/pallets/werkzeug/releases/tag/3.1.4 (opens in a new tab)