CVE-2026-22702

virtualenv Has TOCTOU Vulnerabilities in Directory Creation

MEDIUM
4.5
CVSS Score
Published: January 10, 2026 at 06:05 AM UTC
Updated: June 17, 2026 at 10:20 AM UTC
2 products affected across 2 vendorsVirtualenvVirtualenv

Using virtualenv by pypa?

Get instant alerts when new vulnerabilities affect virtualenv - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.5
Exploit prediction
EPSS 0.1%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 20.36.1
Affected range stops below 20.36.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

x_refsource_CONFIRMMitigationPatchVendor Advisory
Source: cverecord
https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/pypa/virtualenv/pull/3013

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.5MEDIUMGitHub_M
Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
LOW
Vector?

Quick Info

StatusANALYZED
CWE
CWE-59CWE-362

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card