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.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 71.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12python-virtualenvno fix listedDEBIAN-CVE-2026-113726
Debian:13python-virtualenvno fix listedDEBIAN-CVE-2026-113726
Debian:14python-virtualenvno fix listedDEBIAN-CVE-2026-113726
PyPIvirtualenv21.14.4GHSA-5vjq-rrrf-7h2q
Ubuntu:26.04:LTSpython-virtualenvno fix listedUBUNTU-CVE-2026-113726
Ubuntu:26.10python-virtualenvno fix listedUBUNTU-CVE-2026-113726

Affected products (as reported)

VendorProductVersions
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