Skip to main content
VulnerabilityPublished Updated

CVE-2026-27199: pallets werkzeug · Improper Handling of Windows Device Names

Affects pallets werkzeugSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 6.3 Medium : upgrade to 3.1.6 when convenient.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 50% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.1.6
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Upgrade pallets werkzeug to 3.1.6.

Affected software

ProductAffectedFixed in
palletswerkzeugAffected
  • <3.1.6
Fixed in
  • 3.1.6

AI-suggested

The primary mitigation is to upgrade Werkzeug to version 3.1.6 or later, where the vulnerability is fixed. If immediate upgrading is not feasible, organizations should implement strict input validation on user-supplied paths to block requests containing Windows device names such as NUL, CON, PRN, AUX, COM1-COM9, and LPT1-LPT9, especially when these appear as the last path segment. Additionally, consider deploying web application firewalls (WAFs) with custom rules to detect and block suspicious path requests targeting device names. Monitoring application logs for repeated requests with device name patterns can help identify attempted exploitation. Running Werkzeug-based applications on non-Windows platforms can also reduce risk, as the issue specifically affects Windows device name handling. Finally, ensure that application timeout settings are configured to prevent indefinite hangs in case of unexpected file reads.

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.

References

Community reviews

Loading reviews…