{"id":"CVE-2026-102925","published":"2026-09-29T20:50:57Z","modified":"2026-09-30T19:25:16Z","title":"virtualenv bash and fish activation scripts execute commands embedded in paths","vendor":"pypa","product":"virtualenv","tier":"tail","description":{"text":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.13, the generated activate (bash and zsh) and activate.fish scripts place values already escaped by shlex.quote inside an additional quoted context. In the bash and zsh script, a crafted virtual environment path reaches __VIRTUAL_ENV__ when a relocated environment's recorded directory is absent; in the fish script, crafted Tcl or Tk library paths reach __TCL_LIBRARY__ or __TK_LIBRARY__. The surplus quotes can terminate the data-only quoted run and leave shell metacharacters parsed as commands when a user sources the activation script, allowing code execution with that user's privileges. This issue is fixed in version 21.7.13.","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.00231,"percentile":0.08403,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/pypa/virtualenv/security/advisories/GHSA-p58f-9548-mpm2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/pull/3252","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/commit/4d5a105ec2a2723b8c7f4571bb68f4f71d01e3f6","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.7.13","tags":["x_refsource_MISC"]}],"priority":{"score":7.1,"factors":[{"name":"EPSS percentile","points":1.68},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"pypa","affectedVersions":[{"vendor":"pypa","product":"virtualenv","versions":["< 21.7.13"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-09-30T19:24:23.430338Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"virtualenv","vulnerableRanges":["<21.7.13"],"patched":["21.7.13"],"from":["GHSA-p58f-9548-mpm2","PYSEC-2026-4013"],"provenance":"source"}],"summary":{"text":"The virtualenv tool's generated bash, zsh, and fish activation scripts contain a command injection flaw: values already escaped with shlex.quote are wrapped in an extra quoted context, so a crafted virtual environment path (or crafted Tcl/Tk library paths in the fish script) can break out of the quoting. An attacker with local access can get a user to source the activation script for a relocated environment, and shell metacharacters in the crafted path then run as commands with that user's privileges, with user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:09Z"},"euvd":{"id":"EUVD-2026-89461","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pypa-virtualenv-cve-2026-102925","children":[{"from":"CVE-2026-102925","to":"CVE-2026-115586","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/virtualenv/activation/bash/activate.sh"],"commits":["https://github.com/pypa/virtualenv/commit/4d5a105ec2a2723b8c7f4571bb68f4f71d01e3f6","https://github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4"],"basis":"shared function","functions":["deactivate"]}]}],"packageHistory":[{"cve":"CVE-2026-102938","published":"2026-09-29","fixed":"21.7.11","kev":false},{"cve":"CVE-2026-102930","published":"2026-09-29","fixed":"21.7.12","kev":false,"link":{"from":"CVE-2026-102930","to":"CVE-2026-102925","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:virtualenv","fromFixed":"21.7.12","toFixed":"21.7.13","daysApart":0}]}},{"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},{"cve":"CVE-2026-113732","published":"2026-10-20","fixed":"21.14.2","kev":false,"link":{"from":"CVE-2026-102925","to":"CVE-2026-113732","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-113776","published":"2026-10-20","fixed":"21.14.2","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-113726","published":"2026-10-20","fixed":"21.14.4","kev":false}],"package":"PyPI:virtualenv"}}