Medium severity · published Jan 10, 2026
CVE-2026-22702
virtualenv Has TOCTOU Vulnerabilities in Directory Creation
4.5
CVSS
0.1%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.1% · higher than 1% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VI
virtualenv · pypa
< 20.36.1 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-22702
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-22702
Patch
https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc
Issue Tracking
https://github.com/pypa/virtualenv/pull/3013
Mitigation
https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986
More from virtualenv
7.8
CVE-2026-113726
virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
7.8
CVE-2026-113776
virtualenv activation scripts run code from a path that contains a placeholder name
7.8
CVE-2026-113732
virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
7.8
CVE-2026-113725
virtualenv bash activate runs commands from an environment name with a backslash before $
7.8
CVE-2026-113722
virtualenv: Generated POSIX console launchers interpret destination paths as shell syntax
