Vulnerability
CVE-2026-27199
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.
40 advisories report this vulnerability, across 4 ecosystems.
Advisories
-
ALPINE-CVE-2026-27199
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…
- ALPINE-EDGE-CVE-2026-27199
- CGA-2vgr-vpgw-pm9h
- CGA-2wfq-7cmm-qhjv
- CGA-4943-27xv-j44m
- CGA-54qm-wqcx-c7x6
- CGA-5r58-qx37-crf5
- CGA-64w2-639m-vxw8
- CGA-656p-v9c5-55xh
- CGA-6ggh-v45w-ffg7
- CGA-773m-37px-pmq2
- CGA-7rqg-mmpj-79jh
- CGA-98fh-88v2-432v
- CGA-9wxj-vw4x-q6p8
- CGA-c67r-j6fx-489h
- CGA-cmc6-vjc4-c7qv
- CGA-h68f-45pj-47h7
- CGA-jj92-8rj5-x4g8
- CGA-jvv2-767v-36jv
- CGA-m3p3-c3cf-7w9h
- CGA-p6hx-698g-6qqp
- CGA-ph4c-h9ff-vh6m
- CGA-q2jm-h62g-xq49
- CGA-q77m-r2xx-f2mw
- CGA-qc4g-gwrh-c8f7
- CGA-qc9j-523m-vxjc
- CGA-qq39-5764-chcm
- CGA-r6c7-ww45-7wc5
- CGA-rmhc-r57m-hwcj
- CGA-rr3g-p6r8-wxcg
- CGA-v5v8-rg4c-vmhc
- CGA-vh7m-mf7m-74q2
- CGA-vpqr-qx5p-pvc3
- CGA-vq8x-3cg2-6gf7
- CGA-vx88-rjvh-6qf9
- CGA-w2xf-79wg-jx5q
- CGA-x7rh-48f7-x7pw
- CGA-xfc3-mph5-5wg3
-
GHSA-29vq-49wr-vm6x
Werkzeug safe_join() allows Windows special device names
-
PYSEC-2026-2320
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…