CVE-2026-102598: Werkzeug safe_join() allows Windows special device names

Published Sep 29, 2026
·
Updated

Werkzeug is a comprehensive WSGI web application library. Prior to 3.1.9, the safejoin function used by sendfromdirectory can allow a NUL: special-device path because safejoin 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.

Affected Software

1 affected component
pypi/werkzeug<3.1.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Werkzeug to a version that resolves this vulnerability.

    Fixed in 3.1.9

Event History

Sep 29, 2026
CVE Published
via MITRE·03:16 PM
Data Sourced
via MITRE·03:16 PM
DescriptionWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Applications using Werkzeug versions before 3.1.9 are exposed when they run on Windows with NTFS and use safe_join through send_from_directory to serve a user-specified path. Deployments outside that Windows and NTFS scenario are not described as affected.

2

What input is required to trigger the problem?

An attacker must be able to request a user-controlled path that ends in a Windows special device name with an empty NTFS alternate data stream marker, such as NUL:. This causes the special device to open and the file read to hang indefinitely.

3

How can this be remediated?

Upgrade Werkzeug to version 3.1.9, which fixes the handling of these device-name paths.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203