CVE-2026-102938Virtualenv
Medium 5.8
Follow: this CVE · Virtualenv · Virtualenv We alert you by email or Slack (account required).
- Priority
- 35
- CVSS 4.0
- 5.8
- EPSS
- —
- Auth required
- Yes
- Published
- Sep 29, 2026
- Updated
- Nov 19, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-93
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
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.
What to do
- Apply the vendor's security update for Virtualenv.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | virtualenv |
< 21.7.11 |
21.7.11 |
pip install "virtualenv>=21.7.11" |
| PyPI | virtualenv |
< 21.7.11 |
21.7.11 |
pip install "virtualenv>=21.7.11" |
Per OSV / GitHub Advisories (GHSA-9h9j-4vrj-gf7g, PYSEC-2026-4012). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| virtualenv | virtualenv | < 21.7.11 |
Official advisories
- Security update for python-virtualenv · SUSE · SUSE-SU-2026:24940-1 · Nov 18, 2026 High
- Security update for python-virtualenv · SUSE · SUSE-SU-2026:24885-1 · Nov 18, 2026 High
- Security update for python-virtualenv · SUSE · openSUSE-SU-2026:22379-1 · Nov 18, 2026 High
Also: SUSE (+4)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Issue Tracking Patch
- github.com Release Notes
- github.com Vendor Advisory