{"id":"CVE-2026-113726","title":"virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST","summary":"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 si…","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cvssSource":"cna","cwe":["CWE-78","CWE-116"],"vendor":"pypa","product":"virtualenv","affected":["virtualenv < 21.14.4"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-27T21:31:18.828865Z"},"published":"2026-10-20","updated":"2026-10-27","sourceUpdated":"2026-10-27T21:31:29.377Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-113726","references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q","label":"https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q"},{"url":"https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2","label":"https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2"},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.14.4","label":"https://github.com/pypa/virtualenv/releases/tag/21.14.4"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113726"},{"url":"https://github.com/pypa/virtualenv"},{"url":"https://github.com/advisories/GHSA-5vjq-rrrf-7h2q"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-113726.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-113726"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2557304"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-113726"}],"tags":["cve.org","osv","pip","ghsa","csaf","vex","red-hat"],"epss":0.00263,"epssPercentile":0.18025,"aliases":["GHSA-5vjq-rrrf-7h2q"],"ecosystem":"pip","patched":["virtualenv 21.14.4"],"ingestedAt":"2026-10-20T22:23:33.689Z","slug":"CVE-2026-113726","body":"## Overview\n\nvirtualenv 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.\n\n## Affected\n\n- `virtualenv < 21.14.4`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Package advisory (CVE-2026-113726)\n\nAffected packages:\n\n- `virtualenv < 21.14.4`\n\nPatched in:\n\n- `virtualenv 21.14.4`\n\nSource: https://osv.dev/vulnerability/GHSA-5vjq-rrrf-7h2q\n\n## Vendor advisories\n\n- **Red Hat VEX** · Important · affected: OpenShift Lightspeed, Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4, Red Hat OpenShift Dev Spaces, Red Hat Satellite 6 · no fix planned: OpenShift Lightspeed, Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4, … · updated 2026-10-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-113726.json)","depth":"twilight","depthScore":43,"depthScoreParts":{"impact":42.9,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}