Read the docs

Command injection in virtualenv Bash activator via --prompt value

Priority LOW 33CWE-78Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Active
Attack complexity
High
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 5 without a fix

Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-78.

Summary

The bash activator in virtualenv from 21.14.9 before 21.14.13 is affected. It copies an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when promptvars and POSIX mode are off, which is OS command injection (CWE-78). A local attacker with no privileges can run commands as a user who activates the environment once prompt expansion occurs.

Written with Claude Haiku 5.5 from the sources below · 2026-11-03

Description from the CNA

virtualenv is a tool for creating isolated virtual python environments. From 21.14.9 until 21.14.13, the bash bin/activate script can copy an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when both promptvars and POSIX mode are disabled during activation. Re-enabling promptvars, running set -o posix, or starting an interactive child bash that inherits the exported PS1 can then expand command substitution in the stored VIRTUAL_ENV_PROMPT value and execute commands as the user who activates the environment. This issue is fixed in version 21.14.13.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00271 19th percentileScored 2026-11-07
Fix Partial virtualenv (pypa): 21.14.13virtualenv (PyPI): 21.14.13Red Hat: 5 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

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

Affected products

VendorProductAffected versionsFixed inStatusSource
pypavirtualenv21.14.9 to before 21.14.1321.14.13Patch availableCNA
—virtualenv (PyPI)21.14.9 to before 21.14.1321.14.13Patch availableGHSA-cx6f-vjhg-g3cc
  • virtualenv Vendorpypa Affected 21.14.9 to before 21.14.13 Fixed in 21.14.13 Patch available CNA
  • virtualenv (PyPI) Vendor— Affected 21.14.9 to before 21.14.13 Fixed in 21.14.13 Patch available GHSA-cx6f-vjhg-g3cc

Remediation

Upgrade virtualenv to 21.14.13, which fixes this issue. Red Hat says no fix is planned for OpenShift Lightspeed. The sources list no fixed version for Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Dev Spaces and Red Hat Satellite 6.

Written with Claude Haiku 5.5 from the sources below · 2026-11-03

  • Fix · CNA virtualenv (pypa) Fixed in 21.14.13
  • Fix · GHSA-cx6f-vjhg-g3cc virtualenv (PyPI) Fixed in 21.14.13 Advisory →

Vendor assessments

Red Hat

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

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet
Red Hat OpenShift Dev SpacesAffectedNo fix yet
Red Hat Satellite 6AffectedNo fix yet
Not affected: 2 products
  • Red Hat OpenShift AI (RHOAI)
  • Red Hat OpenShift Container Platform 4

Timeline

  1. 2026-10-23 Threatist record created from CVE-2026-115586
  2. 2026-10-23 Alias added: GHSA-cx6f-vjhg-g3cc
  3. 2026-10-23 Fix available: PyPI/[email protected] · GHSA-cx6f-vjhg-g3cc
  4. 2026-10-23 CVSS score added · GHSA-cx6f-vjhg-g3cc
  5. 2026-10-23 Weakness changed · GHSA-cx6f-vjhg-g3cc
  6. 2026-10-23 5 new references · GHSA-cx6f-vjhg-g3cc
  7. 2026-10-24 Affected versions changed · Red Hat
  8. 2026-10-24 CVSS score added · Red Hat
  9. 2026-10-30 Affected versions changed · Red Hat
  10. 2026-11-02 Affected versions changed · Red Hat
  11. 2026-11-03 Affected versions changed · Red Hat

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