# CVE-2026-21860: Werkzeug safe_join() allows Windows special device names with compound extensions

- 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.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2026-01-08T18:34:05.390Z
- Modified: 2026-09-10T03:50:32.862Z
- Also known as: GHSA-87hc-h4r5-73f7, PYSEC-2026-2044
- 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. 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.

(As written by CVE List.)

## Affected

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

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

## References

- <https://github.com/pallets/werkzeug/security/advisories/GHSA-87hc-h4r5-73f7> (vendor-advisory, web)
- <https://github.com/pallets/werkzeug/commit/7ae1d254e04a0c33e241ac1cca4783ce6c875ca3> (patch, 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)

## Sources

- CVE List: [CVE-2026-21860](https://www.cve.org/CVERecord?id=CVE-2026-21860), CVE Terms of Use, modified 2026-01-08
- GitHub Advisory Database: [GHSA-87hc-h4r5-73f7](https://github.com/advisories/GHSA-87hc-h4r5-73f7), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-21860](https://nvd.nist.gov/vuln/detail/CVE-2026-21860), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2044](https://osv.dev/vulnerability/PYSEC-2026-2044), CC-BY-4.0, modified 2026-07-07

---

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