Skip to content
Fencer Vulns
medium 4.5

CVE-2026-22702 json

virtualenv Has TOCTOU Vulnerabilities in Directory Creation

published 2026-01-10 9 mo ago modified 2026-09-10 1 mo ago also BIT-virtualenv-2026-22702 , EUVD-2026-1869 , GHSA-597g-3phw-6986 , PYSEC-2026-2009

cvss
4.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.1%
EPSS 0.1% chance of exploitation in 30 days, percentile 0%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi virtualenv 20.36.1
  • bitnami virtualenv 20.36.1
  • virtualenv virtualenv 20.36.1
  • python-virtualenv Debian 13 20.31.2+ds-1+deb13u1
  • python-virtualenv Debian 14 20.36.1+ds-1

debian advisories DEBIAN-CVE-2026-22702

  • python-virtualenv SLES for SAP applications 16.0, SLES 16.0 20.29.3-160000.3.1
  • python-virtualenv SLE Module for Python 3 15 SP7, openSUSE Leap 15.6 20.22.0-150400.9.9.1

suse advisories SUSE-SU-2026:20129-1SUSE-SU-2026:0233-1

  • python-virtualenv openSUSE Leap 16.0 20.29.3-160000.3.1
  • python-virtualenv openSUSE Tumbleweed 20.36.1-1.1

opensuse advisories openSUSE-SU-2026:20086-1openSUSE-SU-2026:10055-1

  • python-virtualenv Azure Linux 3.0 20.36.1-1

azure linux advisories AZL-74237

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-22702 updated cvss 4.5

virtualenv: virtualenv: Local attacker can redirect file operations via TOCTOU race condition

  • Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9 Red Hat OpenShift Service Mesh 2 openshift-service-mesh/pilot-rhel8, openshift-service-mesh/grafana-rhel8, openshift-service-mesh/proxyv2-rhel9, openshift-service-mesh/istio-cni-rhel8, openshift-service-mesh/ratelimit-rhel8, openshift-service-mesh/istio-rhel8-operator, +2 more Red Hat Ansible Automation Platform 2 ansible-automation-platform-26/hub-rhel9, ansible-automation-platform-26/controller-rhel9, ansible-automation-platform-26/eda-controller-rhel9, ansible-automation-platform-25/ansible-dev-tools-rhel8, ansible-automation-platform-26/ansible-dev-tools-rhel9, ansible-automation-platform-26/lightspeed-chatbot-rhel9, +1 more Red Hat Enterprise Linux 8 ubi8/python-36, rhel8/python-36 Red Hat OpenShift AI (RHOAI) rhoai/odh-ta-lmes-job-rhel9, rhoai/odh-kserve-agent-rhel9, rhoai/odh-kserve-router-rhel9, rhoai/odh-kserve-controller-rhel9, rhoai/odh-kserve-storage-initializer-rhel9, rhoai/odh-ml-pipelines-runtime-generic-rhel9, +22 more Red Hat OpenShift Dev Spaces devspaces/udi-rhel9, devspaces/udi-base-rhel9, devspaces/dashboard-rhel9, devspaces/udi-base-rhel10, devspaces/devspaces-operator-bundle
    +1 more products
    Red Hat Satellite 6 satellite/iop-yuptoo-rhel9, satellite/iop-host-inventory-rhel9, satellite/iop-advisor-backend-rhel9, satellite/iop-vulnerability-engine-rhel9
    affected: workaround, no fix available “Fix deferred”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
9 mo ago

Exploit prediction

0.10% chance of exploitation in the next 30 days, higher than 0% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
GitHub 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
OSV 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Affected packages

ecosystem package affected fixed in
pypi virtualenv
<20.36.1
20.36.1
bitnami virtualenv
<20.36.1
20.36.1

Affected products

  • pypa virtualenv

Classification

Weakness
  • CWE-59 Improper Link Resolution Before File Access
  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.