{"id":"CVE-2026-113722","published":"2026-10-20T19:48:29Z","modified":"2026-10-23T02:03:26Z","title":"virtualenv: Generated POSIX console launchers interpret destination paths as shell syntax","vendor":"pypa","product":"virtualenv","tier":"tail","description":{"text":"virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, virtualenv's ScriptMakerCustom and pip pass an incompletely quoted interpreter path to distlib ScriptMaker when generating POSIX console scripts. When the path contains a space or produces a shebang longer than 127 bytes, distlib emits a /bin/sh wrapper whose double-quoted interpreter path still expands command substitutions and backticks. An attacker who influences the environment destination can therefore execute commands with the user's privileges when the user later runs a generated launcher; environment creation and activation do not trigger the command. Existing launchers are not repaired by upgrading virtualenv alone and must be regenerated, while a later independent pip installation or upgrade can reintroduce an affected launcher because pip's vendored distlib is unchanged. The virtualenv fix is released in version 21.14.9.","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.00264,"percentile":0.11362,"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-c978-59m8-c77v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pypa/virtualenv/pull/3417","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/commit/2519941bed33ee0d3ac99277f67913e439e476a9","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/virtualenv/releases/tag/21.14.9","tags":["x_refsource_MISC"]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":2.27},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"pypa","affectedVersions":[{"vendor":"pypa","product":"virtualenv","versions":["< 21.14.9"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-10-23T02:03:00.262573Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"virtualenv","vulnerableRanges":["<21.14.9",">=20.0.0, <21.14.9"],"patched":["21.14.9"],"from":["GHSA-c978-59m8-c77v","PYSEC-2026-4381"],"provenance":"source"}],"summary":{"text":"The virtualenv Python tool's ScriptMakerCustom and pip components generate POSIX console launchers that incompletely quote the interpreter path passed to distlib's ScriptMaker, so paths containing spaces or long shebangs produce a /bin/sh wrapper that still expands command substitutions and backticks. An attacker who can influence the environment destination path can get commands run with the user's privileges, but only when the user later runs a generated launcher, since creating or activating the environment does not trigger it and the attack requires user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:02:33Z"},"euvd":{"id":"EUVD-2026-105304","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pypa-virtualenv-cve-2026-102925","parents":[{"from":"CVE-2026-113719","to":"CVE-2026-113722","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/virtualenv/seed/embed/via_app_data/pip_install/base.py"],"commits":["https://github.com/pypa/virtualenv/commit/e3cea6fa10a50fa29cf1fdddd772458fba076d5f","https://github.com/pypa/virtualenv/commit/2519941bed33ee0d3ac99277f67913e439e476a9"],"basis":"rarely changed file"}]},{"from":"CVE-2026-113721","to":"CVE-2026-113722","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/virtualenv/seed/embed/via_app_data/pip_install/base.py"],"commits":["https://github.com/pypa/virtualenv/commit/d25f28699eefb1fc34a251e5adf2b5de844c36cd","https://github.com/pypa/virtualenv/commit/2519941bed33ee0d3ac99277f67913e439e476a9"],"basis":"shared function","functions":["_write_script"]}]}]}}