CVE-2025-66221: CWE-67: Improper Handling of Windows Device Names in pallets werkzeug
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.
AI Analysis
Technical Summary
Werkzeug is a widely used Python WSGI utility library that provides various functions for web application development, including safe_join and send_from_directory, which are designed to safely handle file paths and serve files respectively. Prior to version 3.1.4, Werkzeug's safe_join function does not properly handle Windows special device names such as CON, AUX, PRN, NUL, COM1, LPT1, etc. These device names are reserved by the Windows OS and are accessible as special files in every directory. When send_from_directory uses safe_join to resolve a user-supplied path, if the path ends with one of these device names, the file open call succeeds but the subsequent read operation hangs indefinitely because these device files do not behave like normal files. This results in the server process becoming unresponsive or stuck, effectively causing a denial of service (DoS). The vulnerability is exploitable remotely without authentication or user interaction, as it depends solely on crafted HTTP requests targeting the vulnerable endpoint. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, no user interaction, and limited impact on availability (partial denial of service). The issue has been fixed in Werkzeug 3.1.4 by properly validating and rejecting Windows device names in path segments. No known exploits have been reported in the wild as of now.
Potential Impact
For European organizations, this vulnerability primarily poses a risk of denial of service on web applications using vulnerable Werkzeug versions on Windows servers. Exploitation can cause server processes to hang indefinitely, leading to degraded service availability or outages. This can disrupt business operations, especially for public-facing services or internal tools relying on Werkzeug for file serving. While it does not directly compromise confidentiality or integrity, the availability impact can affect customer trust and operational continuity. Organizations in sectors with high reliance on web services, such as finance, healthcare, and government, may face increased operational risk. Additionally, incident response and remediation efforts can incur costs and resource allocation. Since the vulnerability is exploitable remotely without authentication, it increases the attack surface for opportunistic attackers or automated scanning. However, the impact is limited to Windows deployments, so Linux-based Werkzeug applications are not affected.
Mitigation Recommendations
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden
CVE-2025-66221: CWE-67: Improper Handling of Windows Device Names in pallets werkzeug
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.
AI-Powered Analysis
Technical Analysis
Werkzeug is a widely used Python WSGI utility library that provides various functions for web application development, including safe_join and send_from_directory, which are designed to safely handle file paths and serve files respectively. Prior to version 3.1.4, Werkzeug's safe_join function does not properly handle Windows special device names such as CON, AUX, PRN, NUL, COM1, LPT1, etc. These device names are reserved by the Windows OS and are accessible as special files in every directory. When send_from_directory uses safe_join to resolve a user-supplied path, if the path ends with one of these device names, the file open call succeeds but the subsequent read operation hangs indefinitely because these device files do not behave like normal files. This results in the server process becoming unresponsive or stuck, effectively causing a denial of service (DoS). The vulnerability is exploitable remotely without authentication or user interaction, as it depends solely on crafted HTTP requests targeting the vulnerable endpoint. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, no user interaction, and limited impact on availability (partial denial of service). The issue has been fixed in Werkzeug 3.1.4 by properly validating and rejecting Windows device names in path segments. No known exploits have been reported in the wild as of now.
Potential Impact
For European organizations, this vulnerability primarily poses a risk of denial of service on web applications using vulnerable Werkzeug versions on Windows servers. Exploitation can cause server processes to hang indefinitely, leading to degraded service availability or outages. This can disrupt business operations, especially for public-facing services or internal tools relying on Werkzeug for file serving. While it does not directly compromise confidentiality or integrity, the availability impact can affect customer trust and operational continuity. Organizations in sectors with high reliance on web services, such as finance, healthcare, and government, may face increased operational risk. Additionally, incident response and remediation efforts can incur costs and resource allocation. Since the vulnerability is exploitable remotely without authentication, it increases the attack surface for opportunistic attackers or automated scanning. However, the impact is limited to Windows deployments, so Linux-based Werkzeug applications are not affected.
Mitigation Recommendations
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.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-11-24T23:01:29.679Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 692a637a2a13ea799fe08f2a
Added to database: 11/29/2025, 3:07:38 AM
Last enriched: 12/6/2025, 4:32:23 AM
Last updated: 1/13/2026, 3:40:49 PM
Views: 302
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-36640: CWE-269 Improper Privilege Management in Tenable Nessus Agent
HighCVE-2026-22755: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection') in Vivotek Affected device model numbers are FD8365, FD8365v2, FD9165, FD9171, FD9187, FD9189, FD9365, FD9371, FD9381, FD9387, FD9389, FD9391,FE9180,FE9181, FE9191, FE9381, FE9382, FE9391, FE9582, IB9365, IB93587LPR, IB9371,IB9381, IB9387, IB9389, IB939,IP9165,IP9171, IP9172, IP9181, IP9191, IT9389, MA9321, MA9322, MS9321, MS9390, TB9330
CriticalCVE-2025-55462: n/a
CriticalCVE-2025-13774: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Progress Software Flowmon ADS
HighCVE-2025-11669: CWE-862 Missing Authorization in Zohocorp ManageEngine PAM360
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.