CVE-2026-102938: medium-severity vulnerability in pypa virtualenv
virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection
Published · Updated
13Vexday Risk Score
No sign of exploitation. No public exploitation artifact known so far.
ssvc Trackcvss 5.8epss 0.1%
exploitation probability
0.1%top 97% of all CVEs
observed exploitation
nono source reports it
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg format while PyEnvCfg._read_values() parses the file with str.splitlines() and accepts the last value for duplicate keys. An attacker who influences --prompt, VIRTUALENV_PROMPT, or configuration input can insert a recognized line boundary and additional keys, including home, causing consumers to use an attacker-selected base interpreter or corrupted environment metadata. The security impact requires prompt input from outside the operator's trust boundary; directly supplied prompt content primarily corrupts the operator's own environment. This issue is fixed in version 21.7.11.
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
Affected products
pypa · virtualenvRelated CVEs — pypa virtualenv
In the same product, most dangerous first.
CVE-2026-102930HIGHvirtualenv: Downloaded seed wheels (pip/setuptools) are not integrity-checked before useEPSS 0.2%CVE-2026-102925HIGHvirtualenv bash and fish activation scripts execute commands embedded in pathsEPSS 0.2%CVE-2026-102937HIGHvirtualenv: Command injection via --prompt in activate.bat (batch activator)EPSS 0.1%CVE-2026-22702MEDIUMvirtualenv Has TOCTOU Vulnerabilities in Directory CreationEPSS 0.1%