LiveActive security incident?Get immediate response
CVE Record

CVE-2026-22702: virtualenv Has TOCTOU Vulnerabilities in Directory Creation

virtualenv is a tool for creating isolated virtual python environments. Prior to version 20.36.1, TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations. An attacker with local access can exploit a race condition between directory existence checks and creation to redirect virtualenv's app_data and lock file operations to attacker-controlled locations. This issue has been patched in version 20.36.1.

MediumCVSS 4.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2026-22702 affects virtualenv before 20.36.1. A local, low-privileged attacker could exploit a race condition during directory creation to redirect some virtualenv app data or lock file operations through symlinks. Business urgency is moderate because exploitation requires local access and timing, but developer workstations and shared build hosts should be updated.

Executive priority

Treat as a routine but timely dependency update. It is not a remote code execution issue based on provided sources, but shared build and developer systems should be prioritized because local privilege boundaries matter there.

Technical view

The issue is a TOCTOU flaw involving directory existence checks and creation in virtualenv. Sources describe symlink-based attacks affecting app_data and lock file operations. CVSS 3.1 is 4.5 with local attack vector, high attack complexity, low privileges, no user interaction, and limited confidentiality, integrity, and availability impact.

Likely exposure

Systems using pypa virtualenv versions earlier than 20.36.1 are potentially exposed, especially shared development, CI, or build environments where untrusted local users can interact with filesystem locations used by virtualenv.

Exploitation context

The provided sources do not state active exploitation, and the CVE is not marked KEV. Exploitation requires local access, low privileges, and winning a race condition, which raises difficulty. Impact is limited but relevant where shared local access exists.

Researcher notes

Evidence identifies CWE-362 and CWE-59: a race condition enabling symlink-based directory creation redirection. The fix is referenced in pull request 3013 and commit dec4cec5d16edaf83a00a658f32d1e032661cebc. No public exploit status is provided in the source bundle.

Mitigation direction

  • Upgrade virtualenv to version 20.36.1 or later.
  • Prioritize shared developer, CI, and build systems.
  • Review vendor advisory GHSA-597g-3phw-6986 for current guidance.
  • Limit untrusted local user access on systems running affected versions.

Validation and detection

  • Inventory installed virtualenv versions across developer and build environments.
  • Flag virtualenv versions earlier than 20.36.1.
  • Confirm package managers or dependency manifests resolve to 20.36.1 or later.
  • Check shared hosts for untrusted local user access.
Prepared
Confidence
high
Sources
5

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-362: 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
cwe · low confidence lookup

CWE-59: 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-22702 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
4.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

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
4Source 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
4.5CVSS 3.1MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L13.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.5Medium
CVSS 3.1 vector shape for CVE-2026-22702Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
pypavirtualenv< 20.36.1Listed
Weakness

CWE details

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

CWE-362 · source CWE mapping

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-59 · source CWE mapping

Improper Link Resolution Before File Access ('Link Following')

Improper Link Resolution Before File Access ('Link Following') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.