Skip to main content
VulnerabilityPublished Updated

CVE-2025-66221: pallets werkzeug · Improper Handling of Windows Device Names

Affects pallets werkzeugSource CVE Database V5

0

Not known to be exploited · CVSS 6.3 Medium : upgrade to 3.1.4 when convenient.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.5% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 26 Oct 2026.

What to do

Upgrade pallets werkzeug to 3.1.4.

Affected software

ProductAffectedFixed in
PyPIwerkzeugpkg:pypi/werkzeugOther threatsAffected
  • <3.1.4
Fixed in
  • 3.1.4

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

European organizations should immediately upgrade Werkzeug to version 3.1.4 or later to apply the official patch that properly handles Windows device names in path segments. Until upgrade is possible, organizations can implement input validation on user-supplied file paths to reject requests containing Windows device names such as CON, AUX, PRN, NUL, COM1–COM9, LPT1–LPT9. Web application firewalls (WAFs) can be configured to detect and block HTTP requests with suspicious path segments matching these device names. Monitoring and alerting on application hangs or increased response times can help detect exploitation attempts. Where feasible, consider deploying Werkzeug-based applications on non-Windows platforms to avoid this class of vulnerabilities. Conduct thorough testing of file-serving endpoints to ensure they do not accept or process special device names. Finally, maintain an inventory of affected applications and ensure patch management processes prioritize this update.

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.

References

Community reviews

Loading reviews…