Read the docs
TI-2026-18229 Aliases CVE-2026-22702GHSA-597g-3phw-6986

virtualenv Has TOCTOU Vulnerabilities in Directory Creation

Priority LOW 20CWE-362Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
Low · Low · Low
Fix status
Partial Red Hat: 7 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.001 0th percentileScored 2026-11-07
Fix Partial virtualenv (pypa): 20.36.1virtualenv (PyPI): 20.36.1Red Hat: 7 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pypavirtualenvbefore 20.36.120.36.1Patch availableCNA
—virtualenv (PyPI)before 20.36.120.36.1Patch availableGHSA-597g-3phw-6986
  • virtualenv Vendorpypa Affected before 20.36.1 Fixed in 20.36.1 Patch available CNA
  • virtualenv (PyPI) Vendor— Affected before 20.36.1 Fixed in 20.36.1 Patch available GHSA-597g-3phw-6986

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:virtualenv:virtualenv:*:*:*:*:*:*:*:*before 20.36.1VulnerableVirtualenv
  • cpe:2.3:a:virtualenv:virtualenv:*:*:*:*:*:*:*:* Versions before 20.36.1 Vulnerable ·Virtualenv

Remediation

  • Fix · CNA virtualenv (pypa) Fixed in 20.36.1
  • Fix · GHSA-597g-3phw-6986 virtualenv (PyPI) Fixed in 20.36.1 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix yet: Fix deferred
OpenShift Service Mesh 2AffectedNo fix yet: Fix deferred
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 8AffectedNo fix yet: Fix deferred
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet: Fix deferred
Red Hat OpenShift Dev SpacesAffectedNo fix yet: Fix deferred
Red Hat Satellite 6AffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-22702
  2. 2026-10-03 Alias added: GHSA-597g-3phw-6986

References

  • TI-2025-29803 setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write CVSS 4.0HIGH 7.7
  • TI-2024-05888 Remote Code Execution in pypa/setuptools CVSS 3.0HIGH 8.8
  • TI-2026-78525 Shell command injection in virtualenv generated POSIX launchers CVSS 3.1HIGH 7.8
  • TI-2026-78526 Command injection in virtualenv bash activation prompt CVSS 4.0HIGH 7.1
  • TI-2026-78521 Code injection in virtualenv Xonsh activation script CVSS 4.0HIGH 7.1
  • TI-2026-19377 wheel Allows Arbitrary File Permission Modification via Path Traversal CVSS 3.1HIGH 7.1
See all 36 →

Sources