CVE-2026-21860
MEDIUM 6.3CVSS 4.0Werkzeug safe_join() allows Windows special device names with compound extensions
Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.5, Werkzeug's safe_join function allows path segments with Windows device names that have file extensions or trailing spaces. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. Windows still accepts them with any file extension, such as CON.txt, or trailing spaces such as CON. This issue has been patched in version 3.1.5.
- Published
- 8 Jan 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-67
- Also known as
- GHSA-87hc-h4r5-73f7PYSEC-2026-2044
- Sources
- NVDJSONOSV GHSA-87hc-h4r5-73f7JSONOSV PYSEC-2026-2044JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 6.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | palletsprojects | werkzeugcpe:2.3:a:palletsprojects:werkzeug:*:*:*:*:*:*:*:* |
< 3.1.5 | 3.1.5 |
| OSV | PyPI | werkzeug | < 3.1.5 | 3.1.5 |
References
- https://github.com/pallets/werkzeug/commit/7ae1d254e04a0c33e241ac1cca4783ce6c875ca3 · Patch, WEB
- https://github.com/pallets/werkzeug/security/advisories/GHSA-87hc-h4r5-73f7 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-21860 · ADVISORY
- https://github.com/pallets/werkzeug · PACKAGE
- https://pypi.org/project/werkzeug · PACKAGE
- https://github.com/advisories/GHSA-87hc-h4r5-73f7 · ADVISORY
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 8 Jan 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 8 Jan 2026)