CVE-2026-27199
published medium CVSS 4.0 · 6.3Werkzeug safe_join() allows Windows special device names
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pallets | — | werkzeug< 3.1.6 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Alpine Linux | edge | py3-werkzeug | Fixed | 3.1.6-r0 | Package fix record |
| Alpine Linux | v3.24 | py3-werkzeug | Fixed | 3.1.6-r0 | Package fix record |
Description
Werkzeug is a comprehensive WSGI web application library. Versions 3.1.5 and below, the safe_join function allows Windows device names as filenames if preceded by other path segments. This was previously reported as GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact that safe_join accepts paths with multiple segments, such as example/NUL. The function 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 the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely. This issue has been fixed in version 3.1.6.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pallets | werkzeug | < 3.1.6 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-67 CWE-67: Improper Handling of Windows Device Names
References
3Provider assertions
2GitHub_M · cna
Werkzeug safe_join() allows Windows special device names
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 05d289a924b8a888523dfcc4b9a03f0e4e5467ca69db4c58494fadacec942392
- Ingested
- 23 Sep 2026, 09:07:24 UTC
- Source record
- Official CVE record