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

- Priority: **Routine**
- Reason: Not severe (CVSS 4.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-01-10 · Modified: 2026-01-12
- Aliases: SUSE-SU-2026:0233-1, SUSE-SU-2026:20129-1, GHSA-597g-3phw-6986, BIT-virtualenv-2026-22702, PYSEC-2026-2009, UBUNTU-CVE-2026-22702, DEBIAN-CVE-2026-22702, CGA-2wv4-rq96-vf4q, CGA-v645-67w5-g4vh, openSUSE-SU-2026:20086-1, CGA-cc8h-fw79-4vq7, CGA-vwf5-jvhc-hcfm
- Record: https://cvemate.com/vulnerability/CVE-2026-22702 · JSON: https://cvemate.com/vulnerability/CVE-2026-22702/json

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

## Signals

- CVSS: 4.5 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
- EPSS: 0.097%, percentile 0.751%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard py3-cassandra-medusa (Chainguard): \< 0.27.0-r2
- chainguard request-1276 (Chainguard): \< 0.27.0-r4
- wolfi py3-cassandra-medusa (Wolfi): \< 0.27.0-r2
- debian python-virtualenv (Debian): All versions (No fix recorded) \| \< 20.31.2+ds-1+deb13u1 \| \< 20.36.1+ds-1
- ubuntu python-virtualenv (Ubuntu): All versions (No fix recorded)
- pypa virtualenv: \< 20.36.1
- PyPI virtualenv (PyPI): \< 20.36.1
- opensuse python-virtualenv&distro=openSUSE Leap 15.6 (openSUSE): \< 20.22.0-150400.9.9.1
- opensuse python-virtualenv&distro=openSUSE Leap 16.0 (openSUSE): \< 20.29.3-160000.3.1
- suse python-virtualenv&distro=SUSE Linux Enterprise Module for Python 3 15 SP7 (SUSE Linux Enterprise): \< 20.22.0-150400.9.9.1
- suse python-virtualenv&distro=SUSE Linux Enterprise Server 16.0 (SUSE Linux Enterprise): \< 20.29.3-160000.3.1
- suse python-virtualenv&distro=SUSE Linux Enterprise Server for SAP applications 16.0 (SUSE Linux Enterprise): \< 20.29.3-160000.3.1
- virtualenv virtualenv: \< 20.36.1

## 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>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20260233-1/>
- <https://bugzilla.suse.com/1256458>
- <https://www.suse.com/security/cve/CVE-2026-22702>
- <https://www.suse.com/support/update/announcement/2026/suse-su-202620129-1/>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-22702>
- <https://github.com/pypa/virtualenv>
- <https://pypi.org/project/virtualenv>
- <https://github.com/advisories/GHSA-597g-3phw-6986>
- <https://ubuntu.com/security/CVE-2026-22702>
- <https://www.cve.org/CVERecord?id=CVE-2026-22702>
- <https://security-tracker.debian.org/tracker/CVE-2026-22702>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22702.json>

---

Data as of 2026-12-05T10:18:04.627Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
