CVE-2026-102598: Werkzeug Vulnerability in safe_join Function Allows Access to Windows Special Device Names

werkzeug Updated 06 Oct 2026

Summary

05/10/2026
Yes i
Moderate
6.3

CVE-2026-102598: Werkzeug safe_join() allows Windows special device names. Affects werkzeug versions < 3.1.9. Fixed in 3.1.9. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Werkzeug is a comprehensive WSGI utility library for Python that provides various tools for building web applications. It is widely used in the Flask framework and offers features like routing, request and response handling, and debugging. However, a vulnerability has been identified in its safe_join function, which can lead to security issues when handling file paths on Windows systems.

Vulnerability Detail

The vulnerability in Werkzeug's safe_join function arises from its failure to properly filter Windows special device names when they have an empty Alternate Data Stream (ADS) marker on NTFS. This oversight allows attackers to exploit the function by requesting paths that end with special device names like 'NUL:'. If an application uses send_from_directory to serve files and is running on Windows, it may hang indefinitely when attempting to read these files, leading to denial of service and potential data exposure.

How To Fix

Latest published version: 3.1.9 as of 22 Oct 2026

pip install --upgrade "werkzeug==3.1.9"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using send_from_directory with user-specified paths that may end with special device names. Implement additional validation to sanitize user input and prevent the use of such paths.

Conclusion

The vulnerability identified as CVE-2026-102598 in Werkzeug's safe_join function poses a risk for applications running on Windows. By updating to version 3.1.9 or later, developers can mitigate this issue effectively. It is crucial to monitor for vulnerabilities using tools like Vulert to maintain application security.

See every vulnerability recorded for werkzeug →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.3, indicating a moderate severity level.

You can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected without any signup.

Special device names in Windows are reserved names that refer to system devices, such as 'NUL:', 'CON:', and 'PRN:'. These names can be used in file paths and can lead to unexpected behavior if not handled properly.

The impact of this vulnerability includes potential denial of service, as the application may hang indefinitely when trying to read files with special device names. This can disrupt service availability and affect user experience.

Yes, you can implement input validation to ensure that user-specified paths do not include special device names. However, updating to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for werkzeug.

How To Fix

Latest published version: 3.1.9 as of 22 Oct 2026

pip install --upgrade "werkzeug==3.1.9"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback