# CVE-2026-27199: Werkzeug safe_join() allows Windows special device names

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.65%, higher than 46% of CVEs (2026-11-30)
- Published: 2026-02-19T20:32:45.000Z
- Modified: 2026-09-10T03:50:33.709Z
- Also known as: GHSA-29vq-49wr-vm6x, PYSEC-2026-2320
- Weaknesses: CWE-67
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- pallets werkzeug: < 3.1.6
- werkzeug (PyPI): before 3.1.6
- palletsprojects werkzeug: before 3.1.6

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/pallets/werkzeug/security/advisories/GHSA-29vq-49wr-vm6x> (advisory, vendor-advisory, web)
- <https://github.com/pallets/werkzeug/commit/f407712fdc60a09c2b3f4fe7db557703e5d9338d> (fix, patch, web)
- <https://github.com/pallets/werkzeug/releases/tag/3.1.6> (advisory, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-27199> (advisory)
- <https://github.com/pallets/werkzeug> (package)

## Sources

- CVE List: [CVE-2026-27199](https://www.cve.org/CVERecord?id=CVE-2026-27199), CVE Terms of Use, modified 2026-02-24
- GitHub Advisory Database: [GHSA-29vq-49wr-vm6x](https://github.com/advisories/GHSA-29vq-49wr-vm6x), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-27199](https://nvd.nist.gov/vuln/detail/CVE-2026-27199), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2320](https://osv.dev/vulnerability/PYSEC-2026-2320), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-27199 · Whole record: https://cve.day/CVE-2026-27199.json · Rebuilt by cve.day 2026-11-25T22:59:14.600Z
