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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pypa | virtualenv | < 21.7.12 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-virtualenv | No fix yet | — |
| Debian 13 | python-virtualenv | No fix yet | — |
| Debian 12 | python-virtualenv | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-virtualenv | No fix yet | — |
| Ubuntu 26.04 LTS | python-virtualenv | No fix yet | — |
| Ubuntu 18.04 LTS | python-virtualenv | No fix yet | — |
| Ubuntu 16.04 LTS | python-virtualenv | No fix yet | — |
| Ubuntu 14.04 LTS | python-virtualenv | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | python-virtualenv | No fix yet | — |
| Ubuntu Pro 22.04 LTS | python-virtualenv | No fix yet | — |
| Ubuntu Pro 20.04 LTS | python-virtualenv | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-pip +1 | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | py3-cassandra-medusa | 0.30.1-r3 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | virtualenv | < 21.7.12 | 21.7.12 | GHSA-x78j-v8h9-3j2q |
Advisories 1
- WID-SEC-2026-4111 Red Hat Ansible Automation Platform: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026