Skip to content
OpenAdvisories
Medium · 4.5 CVE-2026-22702 BIT-virtualenv-2026-22702EUVD-2026-1869GHSA-597g-3phw-6986PYSEC-2026-2009

virtualenv Has TOCTOU Vulnerabilities in Directory Creation

Published Jan 10, 2026 · Updated Jan 12, 2026 · 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.

Affected products

VendorProductAffectedFixed
pypa virtualenv < 20.36.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-virtualenv 20.36.1+ds-1 —
Debian 13 python-virtualenv 20.31.2+ds-1+deb13u1 —
Debian 12 python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS python-virtualenv No fix yet —
Ubuntu 25.10 python-virtualenv No fix yet —
Ubuntu 18.04 LTS python-virtualenv No fix yet —
Ubuntu 16.04 LTS python-virtualenv No fix yet —
Ubuntu 14.04 LTS python-virtualenv No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 22.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 20.04 LTS python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
SLES 3 python-virtualenv 20.22.0-150400.9.9.1 SUSE-SU-2026:0233-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-virtualenv 20.29.3-160000.3.1 SUSE-SU-2026:20129-1
SLES 16.0 python-virtualenv 20.29.3-160000.3.1 SUSE-SU-2026:20129-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-virtualenv 20.36.1-1.1 openSUSE-SU-2026:10055-1
openSUSE Leap 16.0 python-virtualenv 20.29.3-160000.3.1 openSUSE-SU-2026:20086-1
openSUSE Leap 15.6 python-virtualenv 20.22.0-150400.9.9.1 SUSE-SU-2026:0233-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3.13-virtualenv 20.21.1-1.amzn2023.0.2 ALAS2023-2026-1428

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-virtualenv 20.36.1-1 —
Azure Linux 2 (CBL-Mariner) python-virtualenv No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling py3-cassandra-medusa 0.27.0-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI virtualenv < 20.36.1 20.36.1 GHSA-597g-3phw-6986

Advisories 7

References