LiveActive security incident?Get immediate response
CVE Record

CVE-2026-21860: 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.

MediumCVSS 6.3Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2026-21860 affects Werkzeug before 3.1.5. On Windows, its safe_join path-safety function can mishandle reserved device names such as CON or AUX when they include extensions or trailing spaces. Applications relying on this function for user-supplied file paths may face a limited availability impact. The vendor has patched the issue in 3.1.5.

Executive priority

Treat as a moderate-priority dependency update. Prioritize Windows-hosted applications that expose file-serving or path-handling features. The available evidence supports patching, not emergency response, unless internal exposure analysis shows critical services depend on vulnerable safe_join() behavior.

Technical view

Werkzeug safe_join() did not fully reject Windows special device names with compound extensions or trailing spaces. Because Windows treats these names as implicit devices in every directory, crafted path segments could bypass intended path handling. The CVSS 4.0 score is 6.3, with network attack vector, low complexity, no privileges, no user interaction, and low vulnerable-system availability impact.

Likely exposure

Exposure is most likely in Windows-hosted Python applications using Werkzeug versions earlier than 3.1.5 where safe_join() processes user-controlled path segments. Non-Windows deployments appear less directly exposed based on the described Windows device-name behavior.

Exploitation context

The source bundle does not report active exploitation, and the CVE is not listed as KEV. The CVSS vector indicates remote network reachability with low attack complexity, but some attack prerequisite is present. Reported impact is limited to low availability impact, with no confidentiality or integrity impact in the provided CVSS data.

Researcher notes

The issue is categorized as CWE-67 and fixed by the referenced Werkzeug commit. Analysis should focus on Windows path canonicalization and reserved device-name handling. Avoid assuming exposure in all Werkzeug consumers; the vulnerable condition depends on version, Windows behavior, and application use of safe_join().

Mitigation direction

  • Upgrade Werkzeug to version 3.1.5 or later.
  • Identify applications that bundle or depend on vulnerable Werkzeug versions.
  • Prioritize Windows-hosted services handling user-controlled file paths.
  • If upgrade is delayed, consult Pallets/Werkzeug guidance for supported workarounds.

Validation and detection

  • Confirm installed Werkzeug versions across production and build environments.
  • Check dependency lockfiles and container images for Werkzeug below 3.1.5.
  • Review code paths using safe_join() with user-controlled path segments.
  • Verify upgraded environments report Werkzeug 3.1.5 or later.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-67: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-21860 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.3 (4.0)
Known Exploited
No
Published

Vector: 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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.3CVSS 4.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N——Primary CVE score

Vulnerability scoring details

Base CVSS 4.0 score

6.3Medium
CVSS 4.0 vector shape for CVE-2026-21860Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: 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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
palletswerkzeug< 3.1.5Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-67 · source CWE mapping

Improper Handling of Windows Device Names

Improper Handling of Windows Device Names represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.