Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2026-102937 — virtualenv

Fix: pypa/virtualenv@d721ff1

CVE-2026-102937 is a OS Command Injection vulnerability in virtualenv. A fix is available for virtualenv — see the affected versions and patch details below.

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

Also known asBIT-virtualenv-2026-102937GHSA-x78j-v8h9-3j2qPYSEC-2026-4014
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 20, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-102937.

EPSS Exploitation Probability

via FIRST.org ↗
0.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs3th percentile — riskier than 3% of all scored CVEsHighest risk
0.00%0.21%0.43%0.64%0.1%0.1%Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍virtualenv

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

BatchActivator.quote() returned its input unchanged, the only activator with no escaping at all. --prompt, the VIRTUALENV_PROMPT environment variable, and the config file all set the prompt, and activate.bat writes it straight into @set "VAR=value". A prompt containing a double quote closes that string early, and whatever follows runs as live cmd.exe syntax:

$ virtualenv --prompt 'x" & calc & "' venv
$ venv\Scripts\activate.bat

runs calc the moment someone activates the environment. Confirmed on a real Windows runner. Anyone who templates a prompt from untrusted input (a CI job using a branch name, a wrapper script deriving an environment name from user input) hands an attacker code execution in the shell of anyone who activates the resulting venv on Windows.

Fixed in 21.7.12 by escaping the characters cmd.exe treats as live syntax inside this construct. Fix: https://github.com/pypa/virtualenv/pull/3250

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIvirtualenvall versions21.7.12pip install --upgrade 'virtualenv==21.7.12'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for virtualenv, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update virtualenv to 21.7.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-102937 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

An IMPORTANT severity command injection flaw was found in virtualenv, a tool for creating isolated Python virtual environments that is shipped as a bundled dependency in Red Hat offerings such as Red Hat OpenShift AI, Red Hat Enterprise Linux UBI container images, Red Hat Hardened Images components, and Fedora/EPEL…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. The upstream project has fixed this issue in virtualenv 21.7.12, so upgrading to a version that includes this fix is recommended where available. As a precaution, avoid deriving virtualenv prompt values (the --prompt option, the VIRTUALENV_PROMPT environment variable, or the corresponding configuration setting) from untrusted input on Windows.
Source: Red Hat security advisory for CVE-2026-102937 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat OpenShift AI 3.4rhoai/odh-feature-server-rhel9:1791863220RHSA-2026:84734

Frequently Asked Questions

`BatchActivator.quote()` returned its input unchanged, the only activator with no escaping at all. `--prompt`, the `VIRTUALENV_PROMPT` environment variable, and the config file all set the prompt, and `activate.bat` writes it straight into `@set "VAR=value"`. A prompt containing a double quote closes that string early, and whatever follows runs as live cmd.exe syntax: ```console $ virtualenv --prompt 'x" & calc & "' venv $ venv\Scripts\activate.bat ``` runs `calc` the moment someone activates the environment. Confirmed on a real Windows runner. Anyone who templates a prompt from untrusted in
O3 Security · Impact-Aware SCA

Is CVE-2026-102937 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2026-102937: virtualenv — Fixed in 21.7.12