Skip to content
OpenAdvisories
High · 7.3 CVE-2026-102937 BIT-virtualenv-2026-102937EUVD-2026-89464GHSA-x78j-v8h9-3j2qPYSEC-2026-4014

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

Published Sep 29, 2026 · Updated Oct 2, 2026 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
pypa virtualenv < 21.7.12 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-virtualenv No fix yet —
Debian 13 python-virtualenv No fix yet —
Debian 12 python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-virtualenv No fix yet —
Ubuntu 26.04 LTS python-virtualenv No fix yet —
Ubuntu 18.04 LTS python-virtualenv No fix yet —
Ubuntu 16.04 LTS python-virtualenv No fix yet —
Ubuntu 14.04 LTS python-virtualenv No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 22.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 20.04 LTS python-virtualenv No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-pip +1 No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling py3-cassandra-medusa 0.30.1-r3 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI virtualenv < 21.7.12 21.7.12 GHSA-x78j-v8h9-3j2q

Advisories 1

References