virtualenv: Generated files can follow existing destination links
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.
- Products
- virtualenv
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-113721
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 17:43 UTC · Revision 2
Source evidence
virtualenv: Generated files can follow existing destination links
core-cve · Original sourcePublished 20 Oct 2026, 19:46 UTC
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.
cve:CVE-2026-113721
virtualenv
Fixed versions: Not specified
Complete source record
{
"id": "74b31d1663686a0604ff93fbd136a1b582e800563cfabc6849b193143c39861b",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-113721",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "virtualenv: Generated files can follow existing destination links",
"summary": "virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.",
"evidence": "cve:CVE-2026-113721",
"products": [
{
"name": {
"value": "virtualenv",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-113721",
"aliases": [
"CVE-2026-113721"
],
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.5,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L",
"integrityImpact": "LOW",
"userInteraction": "NONE",
"attackComplexity": "HIGH",
"availabilityImpact": "LOW",
"privilegesRequired": "LOW",
"confidentialityImpact": "LOW"
}
}
],
"affected": [
{
"vendor": "pypa",
"product": "virtualenv",
"versions": [
{
"status": "affected",
"version": "< 21.14.9"
}
]
}
],
"modified": "2026-10-28T16:41:59.056Z",
"provider": "cve",
"references": [
"https://github.com/pypa/virtualenv/security/advisories/GHSA-558c-9hv2-4prj",
"https://github.com/pypa/virtualenv/pull/3431",
"https://github.com/pypa/virtualenv/commit/d25f28699eefb1fc34a251e5adf2b5de844c36cd",
"https://github.com/pypa/virtualenv/releases/tag/21.14.9"
],
"provider_metadata": {
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-113721",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-10-28T16:41:41.590636Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-10-28T16:41:59.056Z"
}
}
],
"cna": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-10-20T19:46:28.770Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-113721",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 461054,
"published_at": "2026-10-20T19:46:28.77+00:00"
}