CVE-2026-102937
High 7.3No known exploitationFix availablevirtualenv: Command injection via --prompt in activate.bat (batch activator)
Record last updated
CVSS score
High on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 11% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
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.
Weakness: CWE-78
Patching and mitigation
- Patch status
- Fix available (source: NVD (reference tagged Patch))
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- msrc.microsoft.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Microsoft | azl3 python-pip 24.2-10 on Azure Linux 3.0 | Not documented | Not documented | Microsoft MSRC |
| Microsoft | azl3 python-virtualenv 20.36.1-6 on Azure Linux 3.0 | Not documented | Not documented | Microsoft MSRC |
| virtualenv | virtualenv | all versions before 21.7.12 | 21.7.12 | NIST NVD |
Timeline
Advisory
Microsoft advisory published
Patch
Fix documented by NVD (reference tagged Patch)
Vendor guidance and references
- https://github.com/pypa/virtualenv/commit/d721ff140ce4afdc2a9b76751e4584e25d9fbea6 (opens in a new tab)patch
- https://github.com/pypa/virtualenv/pull/3250 (opens in a new tab)issue tracking, patch
- Microsoft Security Update Guide (opens in a new tab)vendor-advisory
- https://github.com/pypa/virtualenv/releases/tag/21.7.12 (opens in a new tab)release notes
- https://github.com/pypa/virtualenv/security/advisories/GHSA-x78j-v8h9-3j2q (opens in a new tab)vendor advisory