Moderate severityOSV Advisory· Published Jan 10, 2026· Updated Jan 12, 2026
virtualenv Has TOCTOU Vulnerabilities in Directory Creation
CVE-2026-22702
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
virtualenvPyPI | < 20.36.1 | 20.36.1 |
Affected products
12- Range: 20.0.0b1, 20.0.0b2, 20.0.32, …
- osv-coords11 versionspkg:apk/chainguard/py3-cassandra-medusapkg:apk/chainguard/request-1276pkg:apk/wolfi/py3-cassandra-medusapkg:bitnami/virtualenvpkg:pypi/virtualenvpkg:rpm/opensuse/python-virtualenv&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/python-virtualenv&distro=openSUSE%20Leap%2016.0pkg:rpm/opensuse/python-virtualenv&distro=openSUSE%20Tumbleweedpkg:rpm/suse/python-virtualenv&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP7pkg:rpm/suse/python-virtualenv&distro=SUSE%20Linux%20Enterprise%20Server%2016.0pkg:rpm/suse/python-virtualenv&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0
< 0.27.0-r2+ 10 more
- (no CPE)range: < 0.27.0-r2
- (no CPE)range: < 0.27.0-r4
- (no CPE)range: < 0.27.0-r2
- (no CPE)range: < 20.36.1
- (no CPE)range: < 20.36.1
- (no CPE)range: < 20.22.0-150400.9.9.1
- (no CPE)range: < 20.29.3-160000.3.1
- (no CPE)range: < 20.36.1-1.1
- (no CPE)range: < 20.22.0-150400.9.9.1
- (no CPE)range: < 20.29.3-160000.3.1
- (no CPE)range: < 20.29.3-160000.3.1
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-597g-3phw-6986ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-22702ghsaADVISORY
- github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebcghsax_refsource_MISCWEB
- github.com/pypa/virtualenv/pull/3013ghsax_refsource_MISCWEB
- github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.