6.3medium
Werkzeug safe_join() allows Windows special device names
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hgf8-39gv-g3f2PYSEC-2026-2046
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| pallets werkzeug | < 3.1.4 | CVE List |
| werkzeug (PyPI) | before 3.1.4 | GitHub Advisory Database, PyPA Advisory Database |
| palletsprojects werkzeug | before 3.1.4 | NVD |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
Werkzeug es una completa biblioteca de aplicaciones web WSGI. Antes de la versión 3.1.4, la función safe_join de Werkzeug permite segmentos de ruta con nombres de dispositivos de Windows. En Windows, existen nombres de dispositivos especiales como CON, AUX, etc. que están implícitamente presentes y son legibles en cada directorio. send_from_directory utiliza safe_join para servir archivos de forma segura en rutas especificadas por el usuario bajo un directorio. Si la aplicación se está ejecutando en Windows, y la ruta solicitada termina con un nombre de dispositivo especial, el archivo se abrirá correctamente, pero la lectura se colgará indefinidamente. Este problema ha sido parcheado en la versión 3.1.4.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-66221 changed 2025-12-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hgf8-39gv-g3f2 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-66221 changed 2026-10-07 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2046 changed 2026-07-07 | CC-BY-4.0 |