Medium

Werkzeug safe_join() allows Windows special device names

  • Disclosed: 05.10.2026
  • Updated: 15.10.2026 18:17

Werkzeug's safe_join function allows Windows device names as filenames when they have an empty ADS marker on NTFS.

This was previously reported as https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact Windows allows special device names with an empty ADS marker, such as NUL:.

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 NTFS, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) werkzeug < 3.1.9 3.1.9

References

CVSS score -
CVSS vector
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
Weakness (CWE)
CWE-67
Platform
Python (PyPI)
Package
werkzeug
Disclosed
05.10.2026
Updated
15.10.2026 18:17

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-4312 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-g6x2-hccm-hh4m - CC BY 4.0

Vulnerability history: werkzeug

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (15) in the archive
Total entries
15
First → latest
10.2017 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 4
  • Medium 9
  • Low 1
  • Unrated 1

Disclosures per year

  1. 2017: 1
  2. 2018: 0
  3. 2019: 1
  4. 2020: 1
  5. 2021: 0
  6. 2022: 2
  7. 2023: 3
  8. 2024: 3
  9. 2025: 1
  10. 2026: 3
Severity:
  1. Werkzeug safe_join() allows Windows special device names this entry
    Medium CVE-2026-102598 < 3.1.9 3.1.9
  2. High · 7.5 CVE-2019-14322 < 0.15.5 0.15.5
  3. High · 7.5 CVE-2019-14806 < 0.15.3 0.15.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.