Every CVE Search/ Get API key

CVE-2026-21860

Werkzeug safe_join() allows Windows special device names with compound extensions

6.3 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

Exploit likelihood

0.47%Up 0.4 points since Jan 9, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.3

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

Record
CVE-2026-21860
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-67
Updated
2026-11-02
EUVDEUVD-2026-1425 6.3

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.

Record
EUVD-2026-1425
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-87hc-h4r5-73f7 6.3

Werkzeug safe_join() allows Windows special device names with compound extensions

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 was previously reported as https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2, but the fix failed to account for compound extensions such as CON.txt.html or trailing spaces. It also missed some additional special names.

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.

Record
GHSA-87hc-h4r5-73f7
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-67
Updated
2026-11-02
NVD 6.3

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.

Record
CVE-2026-21860
CVSS 4.0
6.3 MediumCVSS: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
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-67
Updated
2026-11-02
OSVALPINE-CVE-2026-21860 5.3

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.

Record
ALPINE-CVE-2026-21860
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
OSV 6.3

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

Record
CVE-2026-21860
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-67
Updated
2026-11-02
Show 7 moreShow less
OSVGHSA-87hc-h4r5-73f7 6.3

Werkzeug safe_join() allows Windows special device names with compound extensions

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 was previously reported as https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2, but the fix failed to account for compound extensions such as CON.txt.html or trailing spaces. It also missed some additional special names.

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.

Record
GHSA-87hc-h4r5-73f7
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-67
Updated
2026-11-02
OSVPYSEC-2026-2044 6.3

Werkzeug safe_join() allows Windows special device names with compound extensions

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 was previously reported as https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2, but the fix failed to account for compound extensions such as CON.txt.html or trailing spaces. It also missed some additional special names.

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.

Record
PYSEC-2026-2044
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
OSVROOT-APP-PYPI-CVE-2026-21860 5.3

CVE-2026-21860 in rootio-Werkzeug - Patched by Root

Root has patched CVE-2026-21860 in the rootio-Werkzeug package for Root:PyPI. Multiple fixed versions available.

Record
ROOT-APP-PYPI-CVE-2026-21860
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
OSVUBUNTU-CVE-2026-21860 6.3

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.

Record
UBUNTU-CVE-2026-21860
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-02
OSVCLSA-2026-1789452203 No score

TuxCare security update for werkzeug (2 CVEs)

TuxCare rebuilt werkzeug to address 2 CVEs. Fixed in 1.0.1.post6+tuxcare.

Record
CLSA-2026-1789452203
Updated
2026-11-02
OSVCLSA-2026-1789452814 No score

TuxCare security update for werkzeug (3 CVEs)

TuxCare rebuilt werkzeug to address 3 CVEs. Fixed in 2.2.3.post5+tuxcare.

Record
CLSA-2026-1789452814
Updated
2026-11-02
OSVCLSA-2026-1789453348 No score

TuxCare security update for werkzeug (4 CVEs)

TuxCare rebuilt werkzeug to address 4 CVEs. Fixed in 2.3.8.post3+tuxcare.

Record
CLSA-2026-1789453348
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
werkzeug
PyPI
before 3.1.5
3.1.5
py3-werkzeug
Alpine:v3.24
before 3.1.5-r0
3.1.5-r0
werkzeug
TuxCare:PyPI
From an advisory covering 2 CVEs
1.0.1 up to 1.0.1.post6+tuxcare, plus listed versions
1.0.1.post1+tuxcare1.0.1.post2+tuxcare1.0.1.post3+tuxcare1.0.1.post4+tuxcare1.0.1.post5+tuxcare
1.0.1.post6+tuxcare
werkzeug
TuxCare:PyPI
From an advisory covering 3 CVEs
2.2.3 up to 2.2.3.post5+tuxcare, plus listed versions
2.2.3.post1+tuxcare2.2.3.post3+tuxcare2.2.3.post4+tuxcare
2.2.3.post5+tuxcare
werkzeug
TuxCare:PyPI
From an advisory covering 4 CVEs
2.3.8 up to 2.3.8.post3+tuxcare, plus listed versions
2.3.8.post1+tuxcare2.3.8.post2+tuxcare
2.3.8.post3+tuxcare
werkzeug
PyPI
before 3.1.5, plus listed versions
0.10.100.10.10.10.20.10.3
Show 45 moreShow less
0.10.40.110.11.10.11.100.11.110.11.120.11.130.11.140.11.150.11.20.11.30.11.40.11.50.11.60.11.70.11.80.11.90.120.12.10.12.20.130.140.14.10.15.00.15.10.15.20.15.30.15.40.15.50.15.60.16.00.16.10.20.30.3.10.40.4.10.50.5.10.60.6.10.6.20.70.7.10.7.2
3.1.5
rootio-Werkzeug
Root:PyPI
before 3.1.3+root.io.3
3.1.3+root.io.33.1.3+root.io.43.1.0+root.io.1
Werkzeug
Root:PyPI
before 3.1.3+aikido.4
3.1.3+aikido.4

History

History
RecordedChangedSources
affected, facts
affected
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-21860 is a medium vulnerability (CVSS 6.3) in Pallets Werkzeug, published January 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.47%, the 41st percentile. Fixed in werkzeug 3.1.5.

References

Show 4 moreShow less
This page doesn't list everything

Left out here: 52 versions. The JSON record has them.

MoveEnter Open