Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
pypa virtualenv
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

virtualenv 是一个用于创建隔离的 Python 虚拟环境的工具。在 21.7.12 版本之前,BatchActivator.quote() 在 activate.bat 脚本将提示符文本插入到 cmd.exe 的 语句中之前,会原封不动地返回提示符文本。攻击者通过 influence --prompt、VIRTUALENV_PROMPT 或相应的配置值,可以在其中插入双引号以闭合赋值语句,从而使后续的 cmd.exe 操作符变成可执行的语法。当用户激活生成的 Windows 虚拟环境时,注入的命令会以该用

CVSS 7.3 · High EPSS 0.21% · P12

Affected Version Matrix 1

VendorProduct Version RangeStatus
pypa virtualenv < 21.7.12 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-102937

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
virtualenv: Command injection via --prompt in activate.bat (batch activator)
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
OS命令中使用的特殊元素转义处理不恰当(OS命令注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
pypa virtualenv < 21.7.12 -

II. Public POCs for CVE-2026-102937

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-102937

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-102937 (2)

Other References for CVE-2026-102937 (2)

Same Patch Batch · pypa · 2026-09-29 · 4 CVEs total

CVE-2026-102925 7.8 HIGH virtualenv bash and fish activation scripts execute commands embedded in paths
CVE-2026-102930 7.7 HIGH virtualenv: Downloaded seed wheels (pip/setuptools) are not integrity-checked before use
CVE-2026-102938 5.8 MEDIUM virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowi

IV. Related Vulnerabilities