{"id":"CVE-2026-22702","published":"2026-01-10T06:05:53Z","modified":"2026-01-12T16:44:12Z","title":"virtualenv Has TOCTOU Vulnerabilities in Directory Creation","vendor":"pypa","product":"virtualenv","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.001,"percentile":0.0089,"provenance":"source"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/pull/3013","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc","tags":["x_refsource_MISC"]}],"priority":{"score":3.3,"factors":[{"name":"EPSS percentile","points":0.18},{"name":"CVSS severity","points":3.15}]},"vendorSlug":"pypa","affectedVersions":[{"vendor":"pypa","product":"virtualenv","versions":["< 20.36.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-01-12T16:44:05.659101Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"virtualenv","vulnerableRanges":["<20.36.1"],"patched":["20.36.1"],"from":["GHSA-597g-3phw-6986","PYSEC-2026-2009"],"provenance":"source"}],"summary":{"text":"The flaw is a set of time-of-check-time-of-use race conditions in the directory creation logic of virtualenv, a tool for creating isolated Python environments, affecting versions before 20.36.1. A local attacker can exploit the gap between checking that a directory exists and creating it, using symlinks to redirect virtualenv's app_data and lock file operations to attacker-controlled locations, with the attacker needing local access and the attack requiring a high-complexity race to succeed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:41Z"},"euvd":{"id":"EUVD-2026-1869","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2011-4617","published":"2011-12-31","fixed":"1.5","kev":false},{"cve":"CVE-2024-53899","published":"2024-11-24","fixed":"20.26.6","kev":false,"link":{"from":"CVE-2024-53899","to":"CVE-2026-22702","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:virtualenv","fromFixed":"20.26.6","toFixed":"20.36.1","daysApart":412}]}},{"cve":"CVE-2026-22702","published":"2026-01-10","fixed":"20.36.1","kev":false},{"cve":"CVE-2026-102938","published":"2026-09-29","fixed":"21.7.11","kev":false},{"cve":"CVE-2026-102930","published":"2026-09-29","fixed":"21.7.12","kev":false},{"cve":"CVE-2026-102937","published":"2026-09-29","fixed":"21.7.12","kev":false}],"package":"PyPI:virtualenv"}}