Link following in virtualenv lets local users overwrite files
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: 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
virtualenv before 21.14.9 is affected. Its file generation follows existing symbolic or hard links (CWE-59), so a dangling symlink in the destination can redirect generated content. A local user who prepares entries inside the destination directory can make environment creation create or overwrite files outside the requested tree, with the invoking user's permissions.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.
Why it matters now
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pypa | virtualenv | before 21.14.9 | 21.14.9 | Patch available | CNA |
| — | virtualenv (PyPI) | before 21.14.9 | 21.14.9 | Patch available | GHSA-558c-9hv2-4prj |
- virtualenv Vendorpypa Affected before 21.14.9 Fixed in 21.14.9 Patch available CNA
- virtualenv (PyPI) Vendor— Affected before 21.14.9 Fixed in 21.14.9 Patch available GHSA-558c-9hv2-4prj
Remediation
Upgrade virtualenv to version 21.14.9. Red Hat lists no available fix plan for OpenShift Lightspeed, Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4, Red Hat OpenShift Dev Spaces and Red Hat Satellite 6.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA virtualenv (pypa) Fixed in 21.14.9
- Fix · GHSA-558c-9hv2-4prj virtualenv (PyPI) Fixed in 21.14.9 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Lightspeed | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-21 Threatist record created from CVE-2026-113721
- 2026-10-21 Affected versions changed · Red Hat
- 2026-10-21 CVSS score added · Red Hat
- 2026-10-22 Alias added: GHSA-558c-9hv2-4prj
- 2026-10-22 Fix available: PyPI/[email protected] · GHSA-558c-9hv2-4prj
- 2026-10-22 CVSS score added · GHSA-558c-9hv2-4prj
- 2026-10-22 Weakness changed · GHSA-558c-9hv2-4prj
- 2026-10-22 6 new references · GHSA-558c-9hv2-4prj
- 2026-10-28 CISA SSVC decision points changed
References
More pypa vulnerabilities
- 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
Sources
- CVE-2026-113721 · CVE Program
- CVE-2026-113721 · NVD
- FIRST EPSS
- GHSA-558c-9hv2-4prj · GitHub Advisory Database · CC BY 4.0
- CVE-2026-113721 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences