Medium severity · published Jan 8, 2026
CVE-2026-21860
Werkzeug safe_join() allows Windows special device names with compound extensions
5.3
CVSS
0.5%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 41% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
WE
werkzeug · pallets
< 3.1.5 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-21860
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-21860
Patch
https://github.com/pallets/werkzeug/commit/7ae1d254e04a0c33e241ac1cca4783ce6c875ca3
Vendor Advisory
https://github.com/pallets/werkzeug/security/advisories/GHSA-87hc-h4r5-73f7
More from werkzeug
6.3
CVE-2026-102598
Werkzeug safe_join() allows Windows special device names
5.3
CVE-2026-27199
Werkzeug safe_join() allows Windows special device names
5.3
CVE-2025-66221
Werkzeug safe_join() allows Windows special device names
