Python virtualenv: Prior to 21.7.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg
Affects python-virtualenvSource GCVE Database
Not known to be exploited · CVSS 5.8 Medium · fixed in 21.7.11 : update python-virtualenv when convenient.
Data as of 24 Nov 2026, 22:28 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 5.8 |
|---|
- Patch
- Available – fixed in 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:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Sep 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10python-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSpython-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu Pro 24.04 LTSpython-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=esm-apps/nobleOther threats | Affected
| Fixed in– |
Ubuntu Pro 22.04 LTSpython-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=esm-apps/jammyOther threats | Affected
| Fixed in– |
Ubuntu Pro 20.04 LTSpython-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=esm-apps/focalOther threats | Affected
| Fixed in– |
Ubuntu 18.04 LTSpython-virtualenvpkg:deb/ubuntu/python-virtualenv?arch=source&distro=bionicOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
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.
References
- ubuntu.com/security/CVE-2026-102938 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-102938 (opens in a new tab)
- github.com/pypa/virtualenv/commit/a30f995461043acb6cacbf3a890951563ccf7140 (opens in a new tab)
- github.com/pypa/virtualenv/pull/3247 (opens in a new tab)
- github.com/pypa/virtualenv/releases/tag/21.7.11 (opens in a new tab)
- github.com/pypa/virtualenv/security/advisories/GHSA-9h9j-4vrj-gf7g (opens in a new tab)