{"id":"CVE-2026-113776","published":"2026-10-20T22:03:18Z","modified":"2026-10-28T14:54:19Z","title":"virtualenv activation scripts run code from a path that contains a placeholder name","vendor":"pypa","product":"virtualenv","tier":"tail","description":{"text":"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.","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.00266,"percentile":0.1146,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.14.2","tags":["x_refsource_MISC"]}],"priority":{"score":7.8,"factors":[{"name":"EPSS percentile","points":2.29},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"pypa","affectedVersions":[{"vendor":"pypa","product":"virtualenv","versions":[">= 20.26.6, < 21.14.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-28T14:53:53.156314Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"virtualenv","vulnerableRanges":[">=20.26.6, <21.14.2"],"patched":["21.14.2"],"from":["GHSA-8rjx-v5ww-45pp","PYSEC-2026-4387"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-106868","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pypa-virtualenv-cve-2026-102925","parents":[{"from":"CVE-2026-113721","to":"CVE-2026-113776","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/virtualenv/activation/via_template.py"],"commits":["https://github.com/pypa/virtualenv/commit/d25f28699eefb1fc34a251e5adf2b5de844c36cd","https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-102937","published":"2026-09-29","fixed":"21.7.12","kev":false},{"cve":"CVE-2026-102925","published":"2026-09-29","fixed":"21.7.13","kev":false,"link":{"from":"CVE-2026-102925","to":"CVE-2026-113776","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:virtualenv","fromFixed":"21.7.13","toFixed":"21.14.2","daysApart":21}]}},{"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},{"cve":"CVE-2026-113726","published":"2026-10-20","fixed":"21.14.4","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-113725","published":"2026-10-20","fixed":"21.14.7","kev":false},{"cve":"CVE-2026-113714","published":"2026-10-20","fixed":"21.14.9","kev":false}],"package":"PyPI:virtualenv"}}