virtualenv Before 20.36.1: TOCTOU Symlink Race Enables Local Path Traversal
CVE-2026-22702 Published on January 10, 2026
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.
Vulnerability Analysis
CVE-2026-22702 is exploitable with local system access, and requires small amount of user privileges. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to be low. considered to have a small impact on confidentiality and integrity and availability.
Weakness Types
What is an insecure temporary file Vulnerability?
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
CVE-2026-22702 has been classified to as an insecure temporary file vulnerability or weakness.
What is a Race Condition Vulnerability?
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
CVE-2026-22702 has been classified to as a Race Condition vulnerability or weakness.
Affected Versions
pypa virtualenv Version < 20.36.1 is affected by CVE-2026-22702Vulnerable Packages
The following package name and versions may be associated with CVE-2026-22702
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| pip | virtualenv | < 20.36.1 | 20.36.1 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.