BREW-VIRTUALENV-CVE-2026… (CVE-2026-102938)
Vulnerability from osv_homebrew – Published: 2026-10-05 19:15 – Updated: 2026-10-05 19:15 – Source websitevirtualenv 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.
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"upstream_fixed_in": "21.7.11"
},
"package": {
"ecosystem": "Homebrew",
"name": "virtualenv",
"purl": "pkg:brew/virtualenv"
},
"ranges": [
{
"events": [
{
"introduced": "20.4.3"
},
{
"fixed": "21.7.11"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "git",
"upstream_evidence": [
{
"ecosystem": "GIT",
"key": "https://github.com/pypa/virtualenv",
"name": "https://github.com/pypa/virtualenv",
"strategy": "git",
"subject_version": "21.14.5"
},
{
"ecosystem": "PyPI",
"key": "pkg:pypi/virtualenv@21.14.5",
"name": "virtualenv",
"strategy": "registry",
"subject_version": "21.14.5"
},
{
"ecosystem": "Debian",
"key": "Debian/python-virtualenv",
"name": "python-virtualenv",
"strategy": "distro"
},
{
"ecosystem": "GIT",
"key": "upstream:https://github.com/pypa/virtualenv",
"name": "https://github.com/pypa/virtualenv",
"strategy": "distro",
"subject_version": "21.14.5"
},
{
"ecosystem": "PyPI",
"key": "upstream:pkg:pypi/virtualenv@21.14.5",
"name": "virtualenv",
"strategy": "distro",
"subject_version": "21.14.5"
},
{
"ecosystem": "Ubuntu",
"key": "Ubuntu/python-virtualenv",
"name": "python-virtualenv",
"strategy": "distro"
}
]
},
"details": "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\u0027s trust boundary; directly supplied prompt content primarily corrupts the operator\u0027s own environment. This issue is fixed in version 21.7.11.",
"id": "BREW-virtualenv-CVE-2026-102938",
"modified": "2026-10-05T19:15:39Z",
"published": "2026-10-05T19:15:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/pypa/virtualenv/releases/tag/21.7.11"
},
{
"type": "ADVISORY",
"url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102938.json"
},
{
"type": "ADVISORY",
"url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-9h9j-4vrj-gf7g"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102938"
},
{
"type": "FIX",
"url": "https://github.com/pypa/virtualenv/commit/a30f995461043acb6cacbf3a890951563ccf7140"
},
{
"type": "FIX",
"url": "https://github.com/pypa/virtualenv/pull/3247"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection",
"upstream": [
"CVE-2026-102938",
"GHSA-9h9j-4vrj-gf7g",
"PYSEC-2026-4012"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.