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

- Severity: High 7.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-09-18T01:41:45.000Z
- Modified: 2026-11-27T06:45:48.785Z
- Also known as: GHSA-x78j-v8h9-3j2q, BIT-VIRTUALENV-2026-102937, PYSEC-2026-4014
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- pypa virtualenv: < 21.7.12
- virtualenv (PyPI): before 21.7.12
- virtualenv virtualenv: before 21.7.12
- virtualenv (Bitnami): before 21.7.12

## Every score

- GitHub_M: CVSS:4.0 7.3 High `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/pypa/virtualenv/security/advisories/GHSA-x78j-v8h9-3j2q> (advisory, vendor-advisory, web)
- <https://github.com/pypa/virtualenv/pull/3250> (fix, issue-tracking, patch, web)
- <https://github.com/pypa/virtualenv/commit/d721ff140ce4afdc2a9b76751e4584e25d9fbea6> (fix, patch, web)
- <https://github.com/pypa/virtualenv/releases/tag/21.7.12> (article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-102937> (advisory, web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2026-4014.yaml> (web)
- <https://github.com/pypa/virtualenv> (package)
- <https://pypi.org/project/virtualenv> (package, web)

## Sources

- CVE List: [CVE-2026-102937](https://www.cve.org/CVERecord?id=CVE-2026-102937), CVE Terms of Use, modified 2026-10-02
- GitHub Advisory Database: [GHSA-x78j-v8h9-3j2q](https://github.com/advisories/GHSA-x78j-v8h9-3j2q), CC-BY-4.0, modified 2026-10-06
- NVD: [CVE-2026-102937](https://nvd.nist.gov/vuln/detail/CVE-2026-102937), Public domain, modified 2026-11-19
- PyPA Advisory Database: [PYSEC-2026-4014](https://osv.dev/vulnerability/PYSEC-2026-4014), CC-BY-4.0, modified 2026-10-06
- Bitnami Vulnerability Database: [BIT-VIRTUALENV-2026-102937](https://osv.dev/vulnerability/BIT-VIRTUALENV-2026-102937), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-102937 · Whole record: https://cve.day/CVE-2026-102937.json · Rebuilt by cve.day 2026-11-27T07:07:25.377Z
