CVE-2026-102937

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

Published Sep 29, 2026 CVSS 4.0 · 7.3 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x78j-v8h9-3j2q virtualenv: Command injection via --prompt in activate.bat (batch activator)
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pypa
Pypa virtualenv
Python
Python virtualenv
Vendors & Products Pypa
Pypa virtualenv
Python
Python virtualenv
Type Values Removed Values Added
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.
Title virtualenv: Command injection via --prompt in activate.bat (batch activator)
Weaknesses CWE-78
References
Metrics cvssV4_0

{'score': 7.3, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 2, 2026, 12:28 PM
Reserved
Sep 29, 2026, 8:24 PM
Status
Awaiting Analysis
Published
Sep 29, 2026, 9:17 PM
Modified
Oct 2, 2026, 1:17 PM
Severity
Important
Public date
Sep 29, 2026, 8:56 PM