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

Medium 4.5 Published Updated

Local attackers can exploit a race condition in virtualenv to redirect file operations via symlinks, potentially leading to privilege escalation or data modification.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-22702?

CVE-2026-22702 is a medium-severity vulnerability in pypa virtualenv, published on 10 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-59, CWE-362

Which versions are affected by CVE-2026-22702?

4 open source packages ship an affected version, including virtualenv. It affects 1 product.

PackageAffectedFixed in
virtualenv BitnamiAll versions20.36.1
virtualenv PyPIAll versions20.36.1
virtualenv PyPIAll versions20.36.1
virtualenv PyPIAll versions20.36.1
Linux distribution packages (5)
python-virtualenv SUSE:Linux Enterprise Module for Python 3 15 SP7All versions20.22.0-150400.9.9.1
python-virtualenv SUSE:Linux Enterprise Server 16.0All versions20.29.3-160000.3.1
python-virtualenv SUSE:Linux Enterprise Server for SAP applications 16.0All versions20.29.3-160000.3.1
python-virtualenv openSUSE:Leap 15.6All versions20.22.0-150400.9.9.1
python-virtualenv openSUSE:Leap 16.0All versions20.29.3-160000.3.1

Products include Virtualenv Virtualenv.

How do I fix CVE-2026-22702?

Upgrade virtualenv to 20.36.1 or later.

Is CVE-2026-22702 being exploited?

There is no known exploitation of CVE-2026-22702 in the wild and no public exploit code.

Sources

Also known as AZL-74210, AZL-74237, BIT-virtualenv-2026-22702, DEBIAN-CVE-2026-22702, ECHO-bff4-eee0-85f1, GHSA-597g-3phw-6986 and 12 more.

Is CVE-2026-22702 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free