# CVE-2026-22702: virtualenv Has TOCTOU Vulnerabilities in Directory Creation

- Severity: Medium 4.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.10%, higher than 0% of CVEs (2026-12-01)
- Published: 2026-01-10T06:05:53.281Z
- Modified: 2026-09-10T03:50:32.732Z
- Also known as: GHSA-597g-3phw-6986, BIT-VIRTUALENV-2026-22702, PYSEC-2026-2009
- Weaknesses: CWE-59, CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- pypa virtualenv: < 20.36.1
- virtualenv (PyPI): before 20.36.1
- virtualenv virtualenv: before 20.36.1
- virtualenv (Bitnami): before 20.36.1

## Every score

- GitHub_M: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- PyPA Advisory Database: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986> (advisory, mitigation, patch, vendor-advisory, web)
- <https://github.com/pypa/virtualenv/pull/3013> (fix, issue-tracking, patch, web)
- <https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-22702> (advisory, web)
- <https://github.com/pypa/virtualenv> (package)
- <https://pypi.org/project/virtualenv> (package)
- <https://github.com/advisories/GHSA-597g-3phw-6986> (advisory)

## Sources

- CVE List: [CVE-2026-22702](https://www.cve.org/CVERecord?id=CVE-2026-22702), CVE Terms of Use, modified 2026-01-12
- GitHub Advisory Database: [GHSA-597g-3phw-6986](https://github.com/advisories/GHSA-597g-3phw-6986), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-22702](https://nvd.nist.gov/vuln/detail/CVE-2026-22702), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2009](https://osv.dev/vulnerability/PYSEC-2026-2009), CC-BY-4.0, modified 2026-07-07
- Bitnami Vulnerability Database: [BIT-VIRTUALENV-2026-22702](https://osv.dev/vulnerability/BIT-VIRTUALENV-2026-22702), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-22702 · Whole record: https://cve.day/CVE-2026-22702.json · Rebuilt by cve.day 2026-11-25T22:59:12.720Z
