Vulnerabilities in pkg:pypi/Werkzeug
PACKAGECVE-2026-102598 is a MODERATE werkzeug safe_join() allows windows special vulnerability (CWE-67: Improper Handling of Windows Device Names) affecting Werkzeug libraries in the PyPI ecosystem. The issue involves werkzeug safe_join() allows windows special device names. Remediation is available by upgrading affected packages to version 3.1.9.
pkg:pypi/Werkzeug
Vulnerability advisories affecting package pkg:pypi/Werkzeug. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g6x2-hccm-hh4m | CVE-2026-102598 | MODERATE | Werkzeug safe_join() allows Windows special device names |
| GHSA-q34m-jh98-gwm2 | CVE-2024-49767 | MODERATE | Werkzeug possible resource exhaustion when parsing file data in forms |
| GHSA-hrfv-mqp8-q5rw | CVE-2023-46136 | MODERATE | Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning |
| GHSA-87hc-h4r5-73f7 | CVE-2026-21860 | MODERATE | Werkzeug safe_join() allows Windows special device names with compound extensions |
| GHSA-2g68-c3qc-8985 | CVE-2024-34069 | HIGH | Werkzeug debugger vulnerable to remote execution when interacting with attacker controlled domain |
| GHSA-f9vj-2wh5-fj8j | CVE-2024-49766 | MODERATE | Werkzeug safe_join not safe on Windows |
| GHSA-xg9f-g7g7-2323 | CVE-2023-25577 | HIGH | High resource usage when parsing multipart form data with many fields |
| GHSA-px8h-6qxv-m22q | CVE-2023-23934 | LOW | Incorrect parsing of nameless cookies leads to __Host- cookies bypass |
| GHSA-h2fp-xgx6-xh6f | CVE-2016-10516 | MODERATE | Pallets Werkzeug cross-site scripting vulnerability |
CVE-2026-102598 at a Glance
How to Fix CVE-2026-102598
To remediate this vulnerability, upgrade all affected Werkzeug dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Werkzeug>=3.1.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Werkzeug
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-102598, inspect your installed packages using pip:
pip show Werkzeug
Analyze the terminal output to locate any version of Werkzeug in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.9), your application is affected.
Note: The pip show Werkzeug command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-67: Improper Handling of Windows Device Names, where the product constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a windows device name such as aux or con. this typically leads to denial of service or an information exposure when the application attempts to process the pathname as a regular file. In Werkzeug, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-102598 Affected Werkzeug Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Werkzeug
|
PyPI |
< 3.1.9
|
3.1.9
|
References
Frequently Asked Questions
What is CVE-2026-102598?
Which Werkzeug versions are affected?
What version fixes CVE-2026-102598?
Is Werkzeug affected?
What CWE is associated with CVE-2026-102598?
How can I check PyPI dependencies for CVE-2026-102598?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g6x2-hccm-hh4m",
"modified" : "2026-10-05T23:48:39Z",
"published" : "2026-10-05T23:48:39Z",
"aliases" : [ "CVE-2026-102598" ],
"summary" : "Werkzeug safe_join() allows Windows special device names",
"details" : "Werkzeug's `safe_join` function allows Windows device names as filenames when they have an empty ADS marker on NTFS.\n\nThis 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:`.\n\n`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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Werkzeug"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pallets/werkzeug/security/advisories/GHSA-g6x2-hccm-hh4m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-102598"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/werkzeug/pull/3309"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/werkzeug/commit/8d77320bcdf3a34941ec06dcf16b03c065cd21b6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pallets/werkzeug"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/werkzeug/releases/tag/3.1.9"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-67" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-05T23:48:39Z",
"nvd_published_at" : "2026-09-29T16:17:06Z"
}
}