{"id":"CVE-2026-113726","published":"2026-10-20T22:05:24Z","modified":"2026-10-27T21:31:29Z","title":"virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST","vendor":"pypa","product":"virtualenv","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00257,"percentile":0.1063,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.14.4","tags":["x_refsource_MISC"]}],"priority":{"score":7.6,"factors":[{"name":"EPSS percentile","points":2.13},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"pypa","affectedVersions":[{"vendor":"pypa","product":"virtualenv","versions":["< 21.14.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-27T21:31:18.828865Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"virtualenv","vulnerableRanges":["<21.14.4"],"patched":["21.14.4"],"from":["GHSA-5vjq-rrrf-7h2q","PYSEC-2026-4385"],"provenance":"source"}],"summary":{"text":"The virtualenv activate script, which zsh also sources, fails to escape the environment name when zsh is in use, so the raw value is assigned to PS1 in virtualenv versions before 21.14.4 (with a 21.13.0 to 21.14.4 window where escaping applied only under bash). An attacker who can influence the environment directory name, the --prompt option, or the VIRTUALENV_PROMPT value, and where zsh has PROMPT_SUBST enabled, can get commands to run in the user's shell each time the prompt is drawn, which requires the user to activate the affected environment.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:51Z"},"euvd":{"id":"EUVD-2026-106869","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-102925","published":"2026-09-29","fixed":"21.7.13","kev":false},{"cve":"CVE-2026-113732","published":"2026-10-20","fixed":"21.14.2","kev":false},{"cve":"CVE-2026-113776","published":"2026-10-20","fixed":"21.14.2","kev":false,"link":{"from":"CVE-2026-113776","to":"CVE-2026-113726","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:virtualenv","fromFixed":"21.14.2","toFixed":"21.14.4","daysApart":0}]}},{"cve":"CVE-2026-113726","published":"2026-10-20","fixed":"21.14.4","kev":false},{"cve":"CVE-2026-113725","published":"2026-10-20","fixed":"21.14.7","kev":false,"link":{"from":"CVE-2026-113726","to":"CVE-2026-113725","relation":"successor","confidence":"high","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:virtualenv","fromFixed":"21.14.4","toFixed":"21.14.7","daysApart":0},{"kind":"same-code","provenance":"machine","files":["src/virtualenv/activation/bash/activate.sh"],"commits":["https://github.com/pypa/virtualenv/commit/c3104e02474b652832a9bbaae79f6e1696296932","https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2"],"basis":"shared file"}]}},{"cve":"CVE-2026-113714","published":"2026-10-20","fixed":"21.14.9","kev":false},{"cve":"CVE-2026-113715","published":"2026-10-20","fixed":"21.14.9","kev":false}],"package":"PyPI:virtualenv"}}