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.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.5%top 58.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Alpine:v3.24py3-werkzeug3.1.5-r0ALPINE-CVE-2026-21860
PyPIwerkzeug3.1.5GHSA-87hc-h4r5-73f7
PyPIwerkzeug3.1.5PYSEC-2026-2044
Ubuntu:22.04:LTSpython-werkzeugno fix listedUBUNTU-CVE-2026-21860
Ubuntu:24.04:LTSpython-werkzeugno fix listedUBUNTU-CVE-2026-21860
Ubuntu:25.10python-werkzeugno fix listedUBUNTU-CVE-2026-21860

Affected products (as reported)

VendorProductVersions
pallets werkzeug < 3.1.5

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

References