Impact
virtualenv writes prompt values directly into the pyvenv.cfg file without sanitizing line boundaries, allowing an attacker who controls the --prompt option, the VIRTUALENV_PROMPT environment variable, or configuration input to inject arbitrary key/value pairs such as home. The injection corrupts the metadata used by consumers of the virtual environment, potentially causing them to use an attacker‑selected base interpreter or otherwise misconfigure the environment. The vulnerability primarily affects the creator’s own environment and requires input that originates outside the operator’s trust boundary.
Affected Systems
The vulnerability impacts all installations of the PyPA virtualenv tool that run a version earlier than 21.7.11. Any virtualenv created or managed by a user with the ability to supply a prompt value, environment variable, or configuration file is affected.
Risk and Exploitability
The CVSS score of 5.8 indicates a moderate severity. Exploitation requires local access to influence the prompt value or environment variable, and no remote code execution is possible. EPSS information is not available and the issue is not listed in CISA KEV. As a result, the risk is moderate, limited to users who can supply untrusted prompt input to virtualenv. The issue is addressed in virtualenv 21.7.11.
OpenCVE Enrichment
Github GHSA