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

High 7.3 Published Updated

Attackers can execute arbitrary commands on Windows by injecting malicious syntax into the virtual environment prompt during activation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-102937?

CVE-2026-102937 is a high-severity command injection vulnerability in pypa virtualenv, published on 29 Sep 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-78

Which versions are affected by CVE-2026-102937?

4 open source packages ship an affected version, including virtualenv.

PackageAffectedFixed in
virtualenv BitnamiAll versions21.7.12
virtualenv PyPIAll versions21.7.12
virtualenv PyPIAll versions21.7.12
virtualenv PyPIAll versions21.7.12

How do I fix CVE-2026-102937?

Upgrade virtualenv to 21.7.12 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-102937 being exploited?

There is no known exploitation of CVE-2026-102937 in the wild and no public exploit code.

Sources

Also known as AZL-105648, AZL-105666, BIT-virtualenv-2026-102937, DEBIAN-CVE-2026-102937, ECHO-4b3e-29b9-2f98, GHSA-x78j-v8h9-3j2q and 5 more.

Is CVE-2026-102937 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free