Description
virtualenv is a tool for creating isolated virtual python environments. From 20.26.6 until 21.14.2, ViaTemplateActivator.instantiate_template() replaces placeholders one key at a time across the complete activation template, so trigger names such as __VIRTUAL_NAME__, __VIRTUAL_ENV__, or __VIRTUAL_PROMPT__ inside an already substituted and quoted environment path or prompt can be replaced during a later pass. The later value's quoting can close the earlier literal and execute the remaining path when a user activates the environment through bash, fish, xonsh, or activate_this.py. The distinct csh prompt-display token __VIRTUAL_PROMPT_DISPLAY_TCSH__ can instead break the generated script without establishing command execution. The attacker must influence the destination path or --prompt, and a value without a relevant placeholder name does not trigger this mechanism. This issue is fixed in version 21.14.2.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pypa | virtualenv | >= 20.26.6, < 21.14.2 | — |
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 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | python3-virtualenv | 20.4.0-3.amzn2023.0.6 | ALAS2023-2026-3409 |
| Amazon Linux 2023 | python3.13-virtualenv | 20.21.1-1.amzn2023.0.5 | ALAS2023-2026-3410 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-virtualenv | 20.36.1-10 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | virtualenv | >= 20.26.6, < 21.14.2 | 21.14.2 | GHSA-8rjx-v5ww-45pp |
Advisories 2
- ALAS2023-2026-3409 Important: python-virtualenv security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Nov 9, 2026
- ALAS2023-2026-3410 Important: python3.13-virtualenv security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Nov 9, 2026