Vulnerability · Published Oct 20, 2026 · Assigned by GitHub_M
CVE-2026-113726virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
High 7.8
In plain English
A high-severity OS command injection in virtualenv from pypa. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 28% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.13.0, the bash activate script that zsh also sources leaves the environment name unescaped; from 21.13.0 until 21.14.4, it escapes backslashes, dollar signs, and backticks only when BASH_VERSION is set, so zsh receives the raw value. The script assigns that value to PS1. In zsh with PROMPT_SUBST, an attacker-influenced environment directory, --prompt, or VIRTUALENV_PROMPT value containing command, parameter, or arithmetic expansion syntax can therefore execute commands in the user's shell each time the prompt is drawn. A percent sign is separately interpreted as a zsh prompt escape but does not by itself execute commands. Plain zsh with PROMPT_SUBST disabled and bash are not affected by this mechanism. This issue is fixed in version 21.14.4.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113726 |
| Debian:13 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113726 |
| Debian:14 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113726 |
| PyPI | virtualenv | 21.14.4 | GHSA-5vjq-rrrf-7h2q |
| Ubuntu:26.04:LTS | python-virtualenv | no fix listed | UBUNTU-CVE-2026-113726 |
| Ubuntu:26.10 | python-virtualenv | no fix listed | UBUNTU-CVE-2026-113726 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| pypa | virtualenv | < 21.14.4 |
Weakness: CWE-78, CWE-116 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q x_refsource_CONFIRM
- https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2 x_refsource_MISC
- https://github.com/pypa/virtualenv/releases/tag/21.14.4 x_refsource_MISC