Ad · Leaderboard 728×90

CVE-2026-113722

7.8High

Published 20 Oct 2026 · NVD status: Received · AI triage by gemini-3.8-flash

7.8High
Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required
Impact
Full C/I/A compromise
Weakness
CWE-78

Impact

Attackers can run arbitrary shell commands with your privileges if they can influence the virtual environment destination directory and trick you into running an installed launcher. The code executes only when a generated script runs, not during environment creation or activation.

Root cause

distlib's shell script generator wraps incompletely quoted interpreter paths in double quotes, leaving backticks and command substitutions unescaped when paths contain spaces or exceed 127 bytes.

Affected systems

virtualenv prior to 21.14.9 on POSIX systems

CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Fix & remediation

Upgrade virtualenv to 21.14.9 or later, then regenerate all existing virtual environment console scripts. Avoid running launchers from virtual environments placed in untrusted path locations.

shell
$ pip install --upgrade 'virtualenv>=21.14.9'

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

Ad · In-content banner

NVD description

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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-113722

Ad · Sticky 320×50 / 728×90