CVE-2026-102937
published high CVSS 4.0 · 7.3virtualenv: Command injection via --prompt in activate.bat (batch activator)
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pypa | — | virtualenv< 21.7.12 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.3 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pypa | virtualenv | < 21.7.12 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
4Provider assertions
2GitHub_M · cna
virtualenv: Command injection via --prompt in activate.bat (batch activator)
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e1339419270e0812f704fa30a4a65246d0890079a94f8852ef161962d0e916fd
- Ingested
- 02 Oct 2026, 16:23:05 UTC
- Source record
- Official CVE record