cve.bz

CVE-2026-22702 virtualenv virtualenv: Link Following

4.5 mediumEPSS 0.1%Fix available

Medium (4.5) in virtualenv virtualenv. EPSS 0.1% estimated probability of exploitation activity in the next 30 days. Fixed in virtualenv 20.36.1.

On this page
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.

Severity

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
EPSS
0.1% (unchanged from 0.1% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 1st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-01-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A01:2025 Broken Access Control, A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-22702 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-22702?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-22702?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-22702 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
virtualenv:virtualenvbefore 20.36.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-597g-3phw-6986PyPIvirtualenv<20.36.120.36.1
PYSEC-2026-2009PyPIvirtualenv<20.36.120.36.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-virtualenvno fix listedDEBIAN-CVE-2026-22702
Debian13python-virtualenv20.31.2+ds-1+deb13u1DEBIAN-CVE-2026-22702
Debian14python-virtualenv20.36.1+ds-1DEBIAN-CVE-2026-22702
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 5 morepython-virtualenvno fix listedUBUNTU-CVE-2026-22702
SUSELinux Enterprise Module for Python 3 15 SP7python-virtualenv20.22.0-150400.9.9.1SUSE-SU-2026:0233-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0python-virtualenv20.29.3-160000.3.1SUSE-SU-2026:20129-1
openSUSELeap 15.6python-virtualenv20.22.0-150400.9.9.1SUSE-SU-2026:0233-1
openSUSELeap 16.0python-virtualenv20.29.3-160000.3.1openSUSE-SU-2026:20086-1
openSUSETumbleweedpython-virtualenv20.36.1-1.1openSUSE-SU-2026:10055-1
Azure Linux2python-virtualenvno fix listedAZL-74210
Azure Linux3python-virtualenv20.36.1-1AZL-74237

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated Moderate for Red Hat. It affects `virtualenv` and allows a local attacker to perform symlink-based attacks during directory creation. Exploitation requires local access and a race condition, limiting its impact in typical Red Hat deployments.

Red Hat's mitigation

Given that this vulnerability requires local access and exploits a race condition during directory creation, ensuring that `virtualenv` operations are performed in trusted and controlled environments can reduce the risk. Limiting the execution of `virtualenv` by untrusted users or within sandboxed environments can help mitigate potential information disclosure or data tampering.

ProductPackageStateAdvisory
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/grafana-rhel8Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/istio-cni-rhel8Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/istio-must-gather-rhel9Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/istio-operator-bundleFix deferred
OpenShift Service Mesh 2openshift-service-mesh/istio-rhel8-operatorFix deferred
OpenShift Service Mesh 2openshift-service-mesh/pilot-rhel8Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/proxyv2-rhel9Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/ratelimit-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ansible-dev-tools-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/ansible-dev-tools-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/controller-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/eda-controller-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/lightspeed-chatbot-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-tech-preview/ansible-devspaces-rhel9Fix deferred
Red Hat Enterprise Linux 8rhel8/python-36Fix deferred
Red Hat Enterprise Linux 8ubi8/python-36Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-data-science-pipelines-operator-controller-rhel8Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-data-science-pipelines-operator-controller-rhel9Fix deferred
35 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-22702.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High
  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON