Impact
The vulnerability arises in the bash activate script used by virtualenv before version 21.14.7. The script incorrectly escapes the environment name during the second pass of the PS1 prompt rendering, so that a backslash followed by a dollar sign caused shell expansion to occur. As a result, any command placed in the environment name such as $(…) is executed each time Bash draws the prompt, giving the user local command execution capability within the shell. This flaw maps to CWE‑116 (Improper Encoding or Escaping) and CWE‑78 (OS Command Injection).
Affected Systems
Any installation of Python’s virtualenv that is older than 21.14.7 is affected—versions such as 21.14.6 and earlier. The issue is tied to the pypa:virtualenv product and applies to all environments where Bash is used to activate the virtual environment.
Risk and Exploitability
The CVSS score of 7.8 indicates high severity, and the EPSS score is currently unavailable. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires a local attacker who can create or activate an environment with a malicious name; each time the Bash prompt is refreshed, the injected commands run. This local command execution could be leveraged for further privilege escalation or persistence on the affected system.
OpenCVE Enrichment