Improper Handling of Windows Device Names Affecting py3-werkzeug package, versions <3.1.4-r0


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.51% (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-ALPINE324-PY3WERKZEUG-17298003
  • published11 Jun 2026
  • disclosed29 Nov 2025

Introduced: 29 Nov 2025

CVE-2025-66221  (opens in a new tab)
CWE-67  (opens in a new tab)

How to fix?

Upgrade Alpine:3.24 py3-werkzeug to version 3.1.4-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream py3-werkzeug package and not the py3-werkzeug package as distributed by Alpine. See How to fix? for Alpine:3.24 relevant fixed versions and status.

Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.4, Werkzeug's safe_join function allows path segments with Windows device names. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. send_from_directory uses safe_join to safely serve files at user-specified paths under a directory. If the application is running on Windows, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely. This issue has been patched in version 3.1.4.

CVSS Base Scores

version 3.1