CVE-2026-102937
published 2026-09-29CVE-2026-102937: virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.12, BatchActivator.quote() returns prompt text unchanged before…
PriorityP334high7.3CVSS 4.0
AVLACLATPPRNUIPVCHVIHVAHSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
EPSS
0.14%
3.0th percentile
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
41 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| ansible-automation-platform-25 | ansible-dev-tools-rhel8 | — | — |
| ansible-automation-platform-26 | ansible-dev-tools-rhel9 | — | — |
| ansible-automation-platform-26 | controller-rhel9 | — | — |
| ansible-automation-platform-26 | eda-controller-rhel9 | — | — |
| ansible-automation-platform-26 | lightspeed-chatbot-rhel9 | — | — |
| ansible-automation-platform-27 | ansible-dev-tools-rhel9 | — | — |
| ansible-automation-platform-27 | ansible-devspaces-rhel9 | — | — |
| ansible-automation-platform-27 | controller-rhel9 | — | — |
| ansible-automation-platform-27 | eda-controller-rhel9 | — | — |
| ansible-automation-platform-tech-preview | ansible-devspaces-rhel9 | — | — |
| ansible-automation-platform | bootc-automation-portal-rhel9 | — | — |
| debian | python-virtualenv | — | — |
| devspaces | udi-rhel9 | — | — |
| pypa | virtualenv | < 21.7.12 | 21.7.12 |
| rhai-early-access | docling-serve-cuda-rhel9 | — | — |
| rhoai | odh-feature-server-rhel9 | — | — |
| rhoai | odh-kserve-agent-rhel9 | — | — |
| rhoai | odh-kserve-controller-rhel9 | — | — |
| rhoai | odh-kserve-router-rhel9 | — | — |
| rhoai | odh-kserve-storage-initializer-rhel9 | — | — |
| rhoai | odh-pipeline-runtime-datascience-cpu-py312-rhel9 | — | — |
| rhoai | odh-pipeline-runtime-pytorch-cuda-py312-rhel9 | — | — |
| rhoai | odh-pipeline-runtime-pytorch-rocm-py312-rhel9 | — | — |
| rhoai | odh-pipeline-runtime-tensorflow-cuda-py312-rhel9 | — | — |
| rhoai | odh-pipeline-runtime-tensorflow-rocm-py312-rhel9 | — | — |
CVSS provenance
nvdv4.07.3HIGHCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vendor_redhat7.3HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
virtualenv: Command injection via --prompt in activate.bat (batch activator)
ghsa·2026-10-01
CVE-2026-102937 [HIGH] CWE-78 virtualenv: Command injection via --prompt in activate.bat (batch activator)
virtualenv: Command injection via --prompt in activate.bat (batch activator)
`BatchActivator.quote()` returned its input unchanged, the only activator with no escaping at all. `--prompt`, the `VIRTUALENV_PROMPT` environment variable, and the config file all set the prompt, and `activate.bat` writes it straight into `@set "VAR=value"`. A prompt containing a double quote closes that string early, and whatever follows runs as live cmd.exe syntax:
```console
$ virtualenv --prompt 'x" & calc & "' venv
$ venv\Scripts\activate.bat
```
runs `calc` the moment someone activates the environment. Confirmed on a real Windows runner. Anyone who templates a prompt from untrusted input (a CI job using a branch name, a wrapper script deriving an environment name from user input) hands an attacker code e
VulDB
pypa virtualenv up to 21.7.11 BatchActivator activate.bat BatchActivator.quote prompt/VIRTUALENV_PROMPT os command injection
vuldb·2026-09-29·CVSS 7.3
CVE-2026-102937 [HIGH] pypa virtualenv up to 21.7.11 BatchActivator activate.bat BatchActivator.quote prompt/VIRTUALENV_PROMPT os command injection
A vulnerability was found in pypa virtualenv up to 21.7.11. It has been rated as critical. This issue affects the function BatchActivator.quote of the file activate.bat of the component BatchActivator. Performing a manipulation of the argument prompt/VIRTUALENV_PROMPT results in os command injection.
This vulnerability is cataloged as CVE-2026-102937. It is possible to initiate the attack remotely. There is no exploit available.
Upgrading the affected component is advised.
Red Hat
virtualenv: virtualenv: Arbitrary code execution via unescaped prompt in Windows activation script
vendor_redhat·2026-09-29·CVSS 7.3
CVE-2026-102937 [HIGH] CWE-78 virtualenv: virtualenv: Arbitrary code execution via unescaped prompt in Windows activation script
virtualenv: virtualenv: Arbitrary code execution via unescaped prompt in Windows activation script
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.
A flaw was found in virtualenv. An attacker can achieve arbitrary code execution by supplying specially crafted prompt
No detection rules found.
No public exploits indexed.
2026-09-29
Published