Vulnerability · Published Jan 8, 2026 · Assigned by GitHub_M
CVE-2026-21860Werkzeug safe_join() allows Windows special device names with compound extensions
Medium 6.3
In plain English
A medium-severity security flaw in werkzeug from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.5, Werkzeug's safe_join function allows path segments with Windows device names that have file extensions or trailing spaces. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. Windows still accepts them with any file extension, such as CON.txt, or trailing spaces such as CON. This issue has been patched in version 3.1.5.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | py3-werkzeug | 3.1.5-r0 | ALPINE-CVE-2026-21860 |
| PyPI | werkzeug | 3.1.5 | GHSA-87hc-h4r5-73f7 |
| PyPI | werkzeug | 3.1.5 | PYSEC-2026-2044 |
| Ubuntu:22.04:LTS | python-werkzeug | no fix listed | UBUNTU-CVE-2026-21860 |
| Ubuntu:24.04:LTS | python-werkzeug | no fix listed | UBUNTU-CVE-2026-21860 |
| Ubuntu:25.10 | python-werkzeug | no fix listed | UBUNTU-CVE-2026-21860 |
Affected products (as reported)
Weakness: CWE-67 · Vector: 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