Read the docs

virtualenv: Command injection via --prompt in activate.bat (batch activator)

Priority LOW 39CWE-78Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 5 fixed, 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

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.12, BatchActivator.quote() returns prompt text unchanged before activate.bat inserts it into a cmd.exe set "VAR=value" statement. An attacker who influences --prompt, VIRTUALENV_PROMPT, or the corresponding configuration value can include a double quote that closes the assignment and leaves following cmd.exe operators as executable syntax. When a user activates the generated Windows environment, the injected commands run with that user's privileges. This issue is fixed in version 21.7.12.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00208 10th percentileScored 2026-11-07
Fix Partial virtualenv (pypa): 21.7.12virtualenv (PyPI): 21.7.12Red Hat: 5 advisoriesRed Hat: 5 fixed, 5 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
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
pypavirtualenvbefore 21.7.1221.7.12Patch availableCNA
—virtualenv (PyPI)before 21.7.1221.7.12Patch availableGHSA-x78j-v8h9-3j2q
  • virtualenv Vendorpypa Affected before 21.7.12 Fixed in 21.7.12 Patch available CNA
  • virtualenv (PyPI) Vendor— Affected before 21.7.12 Fixed in 21.7.12 Patch available GHSA-x78j-v8h9-3j2q

Remediation

  • Fix · CNA virtualenv (pypa) Fixed in 21.7.12
  • Fix · GHSA-x78j-v8h9-3j2q virtualenv (PyPI) Fixed in 21.7.12 Advisory →

Red Hat 5 advisories

  • RHSA-2026:87410 Released 2026-10-21 · Red Hat rating Critical
    RHOAI 2.25.12 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-codeflare-operator-rhel9 +47
  • RHSA-2026:87124 Released 2026-10-21 · Red Hat rating Critical
    Red Hat Ansible Automation Platform 2.7 Container Release Update
    • Red Hat Ansible Automation Platform 2.7 registry.redhat.io/ansible-automation-platform-27/de-supported-rhel9, registry.redhat.io/ansible-automation-platform-27/eda-controller-rhel9, registry.redhat.io/ansible-automation-platform-27/ee-supported-rhel9 +8
  • RHSA-2026:87120 Released 2026-10-21 · Red Hat rating Critical
    Red Hat Ansible Automation Platform 2.6 Container Release Update
    • Red Hat Ansible Automation Platform 2.6 registry.redhat.io/ansible-automation-platform-26/eda-controller-rhel9, registry.redhat.io/ansible-automation-platform-26/ee-supported-rhel9, registry.redhat.io/ansible-automation-platform-26/gateway-rhel9 +8
Show 2 more Red Hat advisories
  • RHSA-2026:86891 Released 2026-10-21 · Red Hat rating Critical
    RHOAI 3.5.2 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 3.5 registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-cli-rhel9 +47
  • RHSA-2026:84734 Released 2026-10-19 · Red Hat rating Critical
    RHOAI 3.4.5 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-ai-gateway-payload-processing-rhel9, registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-autorag-rhel9 +47

Vendor assessments

Red Hat

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

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat Enterprise Linux 8AffectedNo fix yet
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet
Red Hat Satellite 6AffectedNo fix yet
Self-service automation portal 2AffectedNo fix yet
Red Hat Ansible Automation Platform 2.6Fixed RHSA-2026:87120
Red Hat Ansible Automation Platform 2.7Fixed RHSA-2026:87124
Red Hat OpenShift AI 2.25Fixed RHSA-2026:87410
Red Hat OpenShift AI 3.4Fixed RHSA-2026:84734
Red Hat OpenShift AI 3.5Fixed RHSA-2026:86891
Not affected: 10 products
  • OpenShift Lightspeed
  • Red Hat Ansible Automation Platform 2
  • Red Hat Ansible Automation Platform 2.6
  • Red Hat Ansible Automation Platform 2.7
  • Red Hat Hardened Images
  • Red Hat OpenShift AI 2.25
  • Red Hat OpenShift AI 3.4
  • Red Hat OpenShift AI 3.5
  • Red Hat OpenShift Container Platform 4
  • Red Hat OpenShift Dev Spaces

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-102937
  2. 2026-10-03 Alias added: GHSA-x78j-v8h9-3j2q
  3. 2026-10-06 Affected versions changed · Red Hat
  4. 2026-10-07 Affected versions changed · Red Hat
  5. 2026-10-16 Affected versions changed · Red Hat
  6. 2026-10-20 Fix available: RHSA-2026:84734 · Red Hat
  7. 2026-10-20 Fix available: Red Hat OpenShift AI 3.4 · Red Hat
  8. 2026-10-21 Affected versions changed · Red Hat
  9. 2026-10-22 Fix available: RHSA-2026:87124 · Red Hat
  10. 2026-10-22 Fix available: RHSA-2026:87120 · Red Hat
  11. 2026-10-22 Fix available: RHSA-2026:86891 · Red Hat
  12. 2026-10-22 Fix available: RHSA-2026:87410 · Red Hat
  13. 2026-10-23 Fix available: Red Hat Ansible Automation Platform 2.6, Red Hat Ansible Automation Platform 2.7, Red Hat OpenShift AI 2.25 +1 · 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