{"id":"CVE-2026-22702","state":"PUBLISHED","title":"virtualenv Has TOCTOU Vulnerabilities in Directory Creation","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.","publishedAt":"2026-01-10T06:05:53.281Z","updatedAt":"2026-01-12T16:44:12.734Z","severity":{"score":4.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["pypa virtualenv"],"affected":[{"vendor":"pypa","product":"virtualenv","versions":[{"version":"< 20.36.1","status":"affected"}]}],"references":["https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986","https://github.com/pypa/virtualenv/pull/3013","https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc"],"weaknesses":["CWE-59","CWE-362"],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/22xxx/CVE-2026-22702.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-22702","state":"PUBLISHED","datePublished":"2026-01-10T06:05:53.281Z","dateUpdated":"2026-01-12T16:44:12.734Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-01-08T19:23:09.857Z"},"containers":{"cna":{"title":"virtualenv Has TOCTOU Vulnerabilities in Directory Creation","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"pypa","product":"virtualenv","versions":[{"version":"< 20.36.1","status":"affected"}]}],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986","name":"https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/pull/3013","name":"https://github.com/pypa/virtualenv/pull/3013","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc","name":"https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":4.5,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-59","lang":"en","description":"CWE-59: Improper Link Resolution Before File Access ('Link Following')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-362","lang":"en","description":"CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-01-10T06:05:53.281Z"},"source":{"advisory":"GHSA-597g-3phw-6986","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-01-12T16:44:05.659101Z","id":"CVE-2026-22702","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-12T16:44:12.734Z"}}]}}}