CVE-2026-22702 Details
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.
A TOCTOU (Time-of-Check-Time-of-Use) vulnerability has been identified in virtualenv, a tool for creating isolated Python environments, prior to version 20.36.1. This vulnerability allows local attackers to perform symlink-based attacks during directory creation operations. By exploiting a race condition between checking if a directory exists and creating it, an attacker can redirect virtualenv's app_data and lock file operations to locations under their control. This issue has been patched in version 20.36.1.
Users are advised to upgrade to virtualenv version 20.36.2 or later. If an immediate upgrade is not possible, ensure that the VIRTUALENV_OVERRIDE_APP_DATA environment variable points to a directory that is user-owned and has restricted permissions. Avoid using virtualenv in shared temporary directories where other users can write, and consider using separate user accounts for different projects to keep app_data directories isolated.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 12, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc | [email protected] | Patch |
| https://github.com/pypa/virtualenv/pull/3013 | [email protected] | Issue TrackingPatch |
| https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-362 | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | [email protected] |
| CWE-59 | Improper Link Resolution Before File Access ('Link Following') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| virtualenv virtualenv | < 20.36.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 18, 2026 | Initial Analysis | [email protected] |
| Jan 10, 2026 | New CVE Received | [email protected] |