CVE-2026-22702
MEDIUM 4.5CVSS 3.1virtualenv 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.
- Published
- 10 Jan 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-362CWE-59
- Also known as
- BIT-virtualenv-2026-22702GHSA-597g-3phw-6986PYSEC-2026-2009
- Sources
- NVDJSONOSV GHSA-597g-3phw-6986JSONOSV PYSEC-2026-2009JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L |
| OSV | PyPA | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | virtualenv | virtualenvcpe:2.3:a:virtualenv:virtualenv:*:*:*:*:*:*:*:* |
< 20.36.1 | 20.36.1 |
| OSV | PyPI | virtualenv | < 20.36.1 | 20.36.1 |
References
- https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc · Patch, WEB, FIX
- https://github.com/pypa/virtualenv/pull/3013 · Issue Tracking, Patch, WEB
- https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986 · Mitigation, Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-22702 · ADVISORY
- https://github.com/pypa/virtualenv · PACKAGE
- https://pypi.org/project/virtualenv · PACKAGE
- https://github.com/advisories/GHSA-597g-3phw-6986 · ADVISORY
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 10 Jan 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 13 Jan 2026)