Improper Handling of Windows Device Names Affecting werkzeug package, versions [,3.1.5)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.44% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-WERKZEUG-14908843
  • published9 Jan 2026
  • disclosed8 Jan 2026
  • creditYue (Knox) Liu, Omar M. Hasan

Introduced: 8 Jan 2026

CVE-2026-21860  (opens in a new tab)
CWE-67  (opens in a new tab)

How to fix?

Upgrade werkzeug to version 3.1.5 or higher.

Overview

Affected versions of this package are vulnerable to Improper Handling of Windows Device Names via the safe_join() function, which permits path segments containing Windows special device names with file extensions or trailing spaces. An attacker can access unintended files or devices by crafting malicious path inputs.

Note:

This issues exists due to the incomplete fix for CVE-2025-66221 that failed to account for compound extensions such as CON.txt.html or trailing spaces.

References

CVSS Base Scores

version 4.0
version 3.1