Skip to main content
← All vulnerabilities
CVE-2026-102937PYSEC-2026-4014BIT-VIRTUALENV-2026-102937GHSA-X78J-V8H9-3J2Q

virtualenv: Command injection via --prompt in activate.bat (batch activator)

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 21.7.12
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • pypa virtualenv

    fixed in 21.7.12

  • virtualenvBitnami

    fixed in 21.7.12

  • virtualenvPyPI

    fixed in 21.7.12

References 4

GitHub · pypa/virtualenv