CVE-2026-102937

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

HIGH
7.8
CVSS Score
Published: September 29, 2026 at 08:56 PM UTC
Updated: November 19, 2026 at 07:28 PM UTC
4 products affected across 3 vendorsAnsible Automation Platformansible_automation_platform_developerVirtualenv

Using virtualenv by pypa?

Get instant alerts when new vulnerabilities affect virtualenv - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

Fix versions

  • python-virtualenv 21.14.5-1.el10apRed Hat Ansible Automation Platform 2.6 for RHEL 10
  • python3.12-virtualenv 21.14.5-1.el9apRed Hat Ansible Automation Platform 2.6 for RHEL 9

Fix versions

  • python-virtualenv 21.14.5-1.el10apRed Hat Ansible Automation Platform 2.6 for RHEL 10
  • python3.12-virtualenv 21.14.5-1.el9apRed Hat Ansible Automation Platform 2.6 for RHEL 9
v < 21.7.12

Fix versions

  • Outside the affected range from 21.7.12
    Our inference from the affected range (< 21.7.12)
v < 21.7.12

Fix versions

  • Outside the affected range from 21.7.12
    Our inference from the affected range (< 21.7.12)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_CONFIRMVendor Advisory
Source: cverecord
https://github.com/pypa/virtualenv/security/advisories/GHSA-x78j-v8h9-3j2q
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/pypa/virtualenv/pull/3250
x_refsource_MISCRelease Notes
Source: cverecord
https://github.com/pypa/virtualenv/releases/tag/21.7.12

SSVC — Action Prioritization

SSVCNo known exploitAutomatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-78

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card

This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE records are from the CVE Program (CVE.org).