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


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.56% (42nd 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-15322677
  • published20 Feb 2026
  • disclosed19 Feb 2026
  • creditAli Sherif

Introduced: 19 Feb 2026

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

How to fix?

Upgrade werkzeug to version 3.1.6 or higher.

Overview

Affected versions of this package are vulnerable to Improper Handling of Windows Device Names via the safe_join function. An attacker can cause the application to hang indefinitely by requesting a path ending with a Windows special device name.

Notes:

  1. This is only vulnerable on Windows, where special device names are implicitly present in every directory;

  2. This is a bypass of CVE-2025-66221, as the added filtering failed to account for the fact that safe_join accepts paths with multiple segments, such as example/NUL.

CVSS Base Scores

version 4.0
version 3.1