CVE-2026-27199

Werkzeug safe_join() allows Windows special device names

MEDIUM
5.3
CVSS Score
Published: February 21, 2026 at 05:15 AM UTC
Updated: June 17, 2026 at 10:26 AM UTC
2 products affected across 2 vendorsWerkzeugWerkzeug

Using werkzeug by pallets?

Get instant alerts when new vulnerabilities affect werkzeug - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

Description

Werkzeug is a comprehensive WSGI web application library. Versions 3.1.5 and below, the safe_join function allows Windows device names as filenames if preceded by other path segments. This was previously reported as GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact that safe_join accepts paths with multiple segments, such as example/NUL. The function 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 fixed in version 3.1.6.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.1.6
Affected range stops below 3.1.6, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
LOW
Vector?

Quick Info

StatusANALYZED
CWE
CWE-67

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card