BREW-VIRTUALENV-CVE-2026-22702 (CVE-2026-22702)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:46 – Updated: 2026-09-24 09:59 – Source websitevirtualenv is a tool for creating isolated virtual python environments. Prior to version 20.36.1, TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations. An attacker with local access can exploit a race condition between directory existence checks and creation to redirect virtualenv's app_data and lock file operations to attacker-controlled locations. This issue has been patched in version 20.36.1.
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"upstream_fixed_in": "20.36.1"
},
"package": {
"ecosystem": "Homebrew",
"name": "virtualenv",
"purl": "pkg:brew/virtualenv"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "21.7.4"
}
],
"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.11.0"
},
{
"ecosystem": "PyPI",
"key": "pkg:pypi/virtualenv@21.11.0",
"name": "virtualenv",
"strategy": "registry",
"subject_version": "21.11.0"
},
{
"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.11.0"
},
{
"ecosystem": "PyPI",
"key": "upstream:pkg:pypi/virtualenv@21.11.0",
"name": "virtualenv",
"strategy": "distro",
"subject_version": "21.11.0"
},
{
"ecosystem": "Ubuntu",
"key": "Ubuntu/python-virtualenv",
"name": "python-virtualenv",
"strategy": "distro"
}
]
},
"details": "virtualenv is a tool for creating isolated virtual python environments. Prior to version 20.36.1, TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities in virtualenv allow local attackers to perform symlink-based attacks on directory creation operations. An attacker with local access can exploit a race condition between directory existence checks and creation to redirect virtualenv\u0027s app_data and lock file operations to attacker-controlled locations. This issue has been patched in version 20.36.1.",
"id": "BREW-virtualenv-CVE-2026-22702",
"modified": "2026-09-24T09:59:49Z",
"published": "2026-08-13T17:46:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22702.json"
},
{
"type": "ADVISORY",
"url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-597g-3phw-6986"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22702"
},
{
"type": "FIX",
"url": "https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc"
},
{
"type": "FIX",
"url": "https://github.com/pypa/virtualenv/pull/3013"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "virtualenv Has TOCTOU Vulnerabilities in Directory Creation",
"upstream": [
"CVE-2026-22702",
"BIT-virtualenv-2026-22702",
"GHSA-597g-3phw-6986",
"PYSEC-2026-2009"
]
}
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.