Sceawere
Vulnerability Detail
CVE-2026-66897UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
LXD Instance Template Path Traversal
Vulnerability Metadata
- Severity
- Critical
- Score / CVSS
- 9.9
- Creation Date
- 2h ago
- Vendor
- Canonical
- Product
- LXD
- Attack Type
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Attack Complexity
- LOW
Narrative and Response
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.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "9.9",
"pubDate": "2026-08-24T10:16:39.767Z",
"pubdate": "2026-08-24T10:16:39.767Z",
"executiveSummary": "A path traversal vulnerability exists in the LXD instance template processing mechanism, specifically when handling target template paths defined within metadata.yaml.\nThe vulnerability allows an attacker with container edit permissions, or any user capable of launching a crafted image, to escape directory confinement and overwrite arbitrary files on the host system with root privileges.\nThis flaw introduces severe risk implications, leading directly to host system compromise and arbitrary code execution as root.\nThe attack flow relies on a discrepancy between initial path validation checks and the subsequent file creation operation.\nExploitation requires either container edit permissions or the ability to initiate the launch of a maliciously crafted image.",
"technicalDetails": "The root cause of the vulnerability stems from a validation and file handling discrepancy within LXD template processing.\nWhen processing target template paths specified in metadata.yaml, the vulnerable component validates the path against a confined os.Root directory handle.\nHowever, subsequent file operations violate this confinement by opening and creating the target file using os.Create with an unconfined string path instead of leveraging the secure directory handle.\nThis design flaw permits directory traversal sequences within the path definitions to bypass the initial security checks.\nTo execute the attack, an adversary with container edit permissions or a user launching a crafted image supplies malicious target template paths in metadata.yaml.\nDuring template expansion, the unconfined os.Create function writes to locations outside the intended directory boundary, resolving relative traversal paths against the underlying host filesystem.\nThis behavior enables the attacker to overwrite root-owned host files.\nPost-exploitation impact includes complete host root code execution, as critical system configuration or binary files can be modified or replaced."
}