CVE-2026-66897
Full vulnerability record from the local CVENow database.
Description
A path traversal vulnerability in LXD's instance template processing allows an attacker with container edit permissions, or any user launching a crafted image, to overwrite arbitrary files on the host system as root. When processing target template paths specified in metadata.yaml, LXD validates the path against a confined os.Root directory handle but subsequently opens and creates the file using os.Create with an unconfined string path. This discrepancy between path resolution checks and file creation allows an attacker to escape directory confinement, overwrite root-owned host files, and achieve host root code execution.
Severity
CRITICAL
CVSS score
9.9
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-08-24 10:16:39.767000
Last modified
2026-10-24 16:10:00.153000
View original CVE JSON
{
"id": "CVE-2026-66897",
"sourceIdentifier": "[email protected]",
"published": "2026-08-24T10:16:39.767",
"lastModified": "2026-10-24T16:10:00.153",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "A path traversal vulnerability in LXD's instance template processing allows an attacker with container edit permissions, or any user launching a crafted image, to overwrite arbitrary files on the host system as root. When processing target template paths specified in metadata.yaml, LXD validates the path against a confined os.Root directory handle but subsequently opens and creates the file using os.Create with an unconfined string path. This discrepancy between path resolution checks and file creation allows an attacker to escape directory confinement, overwrite root-owned host files, and achieve host root code execution."
},
{
"lang": "es",
"value": "Una vulnerabilidad de salto de ruta en el procesamiento de plantillas de instancia de LXD permite a un atacante con permisos de edición de contenedor, o a cualquier usuario que inicie una imagen manipulada, sobrescribir archivos arbitrarios en el sistema anfitrión como root. Al procesar rutas de plantilla de destino especificadas en metadata.yaml, LXD valida la ruta contra un manejador de directorio os.Root confinado, pero posteriormente abre y crea el archivo usando os.Create con una ruta de cadena no confinada. Esta discrepancia entre las comprobaciones de resolución de ruta y la creación de archivos permite a un atacante escapar del confinamiento de directorio, sobrescribir archivos del anfitrión propiedad de root y lograr la ejecución de código root en el anfitrión."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "Canonical",
"product": "LXD",
"defaultStatus": "unaffected",
"packageName": "LXD",
"platforms": [
"Linux"
],
"repo": "https://github.com/canonical/lxd",
"versions": [
{
"version": "4.0.0",
"lessThan": "4.0.13",
"versionType": "semver",
"status": "affected"
},
{
"version": "5.0.0",
"lessThan": "5.0.9",
"versionType": "semver",
"status": "affected"
},
{
"version": "5.21.0",
"lessThan": "5.21.7",
"versionType": "semver",
"status": "affected"
},
{
"version": "6.0",
"lessThan": "6.10",
"versionType": "semver",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"baseScore": 9.9,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "CHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.1,
"impactScore": 6.0
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-24T00:00:00+00:00",
"id": "CVE-2026-66897",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-22"
},
{
"lang": "en",
"value": "CWE-23"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.0.13",
"matchCriteriaId": "C0F22A55-5146-4B91-9D3E-BC4509F506BE"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.0.0",
"versionEndExcluding": "5.0.9",
"matchCriteriaId": "5DE002EB-DEFA-4284-A2C5-F68C71B121DF"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.1",
"versionEndExcluding": "5.21.7",
"matchCriteriaId": "84E5D160-5D14-4E78-AEDD-E9906420FB2E"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.0",
"versionEndIncluding": "6.9",
"matchCriteriaId": "372FD242-9957-420D-BDDC-D4C81BB996D4"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/canonical/lxd/security/advisories/GHSA-q39m-8fx9-42fv",
"source": "[email protected]",
"tags": [
"Vendor Advisory",
"Exploit"
]
}
]
}