CVE Catalog

CVE-2026-102937

HighCVSS 7.3
Published: Translated: NVD NIST

Summary

In virtualenv prior to 21.7.12, BatchActivator.quote() returns prompt text unchanged before activate.bat inserts it into a cmd.exe set "VAR=value" statement. An attacker who influences --prompt, VIRTUALENV_PROMPT, or the corresponding configuration value can include a double quote that closes the assignment and leaves following cmd.exe operators as executable syntax. When a user activates the generated Windows environment, the injected commands run with that user's privileges.

Risk Assessment

An attacker can execute arbitrary commands with the privileges of the user activating the environment, leading to system compromise. This requires influence over the prompt value, which may be possible in some deployment scenarios.

Recommendation

Update virtualenv to version 21.7.12 or later. Avoid using untrusted prompt values and verify the integrity of generated activation scripts.

Other vulnerabilities in virtualenv

See all
Original NVD description (English source)

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.12, BatchActivator.quote() returns prompt text unchanged before activate.bat inserts it into a cmd.exe set "VAR=value" statement. An attacker who influences --prompt, VIRTUALENV_PROMPT, or the corresponding configuration value can include a double quote that closes the assignment and leaves following cmd.exe operators as executable syntax. When a user activates the generated Windows environment, the injected commands run with that user's privileges. This issue is fixed in version 21.7.12.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS