Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain container edit rights or publish crafted image
-
DeliveryCraft metadata.yaml with traversal template path
-
ExploitLaunch instance / apply template in LXD
-
ExecutionValidation passes on os.Root but os.Create writes unconfined
-
PersistOverwrite root-owned host file
-
ImpactExecute code as root on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires either (a) an account with container edit permissions on the target LXD instance, or (b) the ability to get a victim to launch/import an attacker-crafted image, and the attacker must supply a metadata.yaml whose template target path uses directory-traversal sequences. The vulnerable code path is triggered only during instance template processing, so the target must actually create/launch an instance from the crafted image or apply the crafted template. Limiting factors: the attacker needs the container-edit privilege level (not fully unauthenticated) or must win an image-supply/social step; hosts that never import untrusted images and tightly restrict container edit rights are not exposed to remote actors. The impact - arbitrary root-owned file overwrite on the host - is not gated by any special host configuration; it stems from the default template-processing logic. |
| Impact | The signals are largely aligned toward high priority. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, 9.9) reflects low-complexity exploitation, only low privileges (container edit rights or the ability to get a victim to launch an image), no user interaction beyond that, and a scope change that carries full CIA impact from the container into the host. There is no CISA KEV listing and no EPSS score in the provided data, and no public exploit identified at time of analysis, so real-world exploitation is not yet evidenced - this reads as a serious latent risk rather than a confirmed mass-exploitation event. One caveat: AV:N assumes exploitation via the network-facing LXD API; the 'launching a crafted image' path can also be a supply-chain/social vector where a user imports an untrusted image, which is closer to a local/interaction-dependent scenario - defenders should weigh which path applies to their deployment. The scope change and 'as root' host impact justify treating this as urgent for any multi-tenant or untrusted-image LXD host. |
| Exploit ScenarioDerived | A tenant with edit rights on their own container, or an attacker who publishes a malicious LXD image to a registry, crafts a metadata.yaml whose template target path uses traversal sequences pointing outside the instance directory (for example toward /etc or a systemd unit / cron path). When LXD renders the template it validates against the confined os.Root handle but writes via os.Create to the unconfined path, overwriting a root-owned host file and enabling host root code execution. No public exploit is identified at time of analysis, but the low attack complexity makes a working exploit straightforward to develop. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
Host root code execution in Canonical LXD arises from a path-traversal flaw in instance template processing, letting an attacker with container edit permissions - or any user who launches a maliciously crafted image - overwrite arbitrary root-owned files on the host. The root cause is a validate-then-open mismatch: LXD checks template target paths against a confined os.Root handle but then creates the file via os.Create using the raw, unconfined string path. No public exploit has been identified at time of analysis, but the CVSS 9.9 rating and container-to-host scope change make this a critical container-escape.
RemediationAI
Upgrade LXD to the fixed release identified in Canonical's advisory GHSA-q39m-8fx9-42fv (https://github.com/canonical/lxd/security/advisories/GHSA-q39m-8fx9-42fv); an exact patched version number is not provided in the input and must be taken from that advisory. Until patched, restrict who holds container edit permissions and treat that permission as host-root-equivalent, and do not launch or import images from untrusted sources - inspect any third-party image's metadata.yaml templates before use, since a crafted template is the delivery mechanism. Where feasible, run LXD hosts as single-tenant or isolate untrusted workloads onto dedicated hosts so a container escape cannot reach shared production systems; the trade-off is reduced consolidation density. Audit existing instances/images for template target paths containing traversal sequences.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LXD is Canonical's system container and VM manager. During instance creation it processes templates declared in an image's metadata.yaml, rendering files into the new instance's filesystem. The vulnerability is a classic CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) instance manifesting as a TOCTOU-style confinement bypass: the code resolves and validates the template target relative to a confined os.Root directory handle (which is designed to prevent escapes such as '../' sequences and symlink traversal), but the subsequent write uses os.Create with an unconfined absolute/relative string path. Because the security check and the actual filesystem operation operate on different path representations, the '../' sequences honored by os.Create are never enforced against the os.Root boundary, so writes land outside the intended instance directory on the host as the root user running the LXD daemon.
Know when Lxd gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Container edit permission gives PR:L via the network-facing LXD API with low complexity; the escape from container to host root is a scope change with full CIA impact.
Primary rating from Vendor (canonical).
CVSS VectorVendor: canonical
Lifecycle Timeline
2DescriptionCVE.org
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 ViewAI
Canonical LXD contains a critical path-traversal vulnerability (CVE-2026-66897, CVSS 9.9) enabling host root code execution from container workloads, allowing attackers with container edit permissions or ability to deploy malicious images to compromise the entire host system and all hosted containers. Organizations running LXD infrastructure face immediate risk of full system compromise, data exfiltration, and lateral movement to interconnected systems. This represents an unacceptable risk level for any production LXD environment.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict container edit permissions and image deployment to administrative accounts only; (2) implement mandatory AppArmor/SELinux confinement profiles with minimal capabilities; (3) disable remote image sources and whitelist only internally-verified container images; (4) enforce strict network segmentation between LXD hosts and production systems; (5) implement comprehensive host-level file integrity monitoring and alerting for unauthorized modifications; (6) temporarily suspend LXD for non-critical workloads pending patch release; (7) increase audit logging of all container and image operations.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Cross-site request forgery in the LXD-UI component of Canonical LXD 5.0 before 5.0.5, 5.1 before 5.21.4, and 6.0 before
Privilege escalation in Canonical LXD's operations API (LXD before 6.5 and LXD 5.21 before 5.21.4) allows an authenticat
Authenticated remote attackers with access to the Canonical LXD instance log retrieval or deletion endpoints can read ar
Server-side template injection in Canonical LXD's instance snapshot naming feature lets an authenticated user who can mo
Unauthenticated project enumeration in Canonical LXD 5.21.x before 5.21.4 and 6.x before 6.5 lets remote attackers deter
Unauthenticated remote attackers can confirm the existence of LXD projects on Canonical LXD by comparing HTTP status cod
Privilege escalation to host root in Canonical LXD occurs when the container manager unpacks crafted image or backup arc
Arbitrary host file read and write in Canonical LXD occurs because the image import/unpack routine does not verify wheth
Canonical LXD's NVIDIA GPU passthrough configuration handler fails to sanitize newline characters in user-supplied `nvid
Path traversal in Canonical's LXD container and VM manager allows a user with backup import/restore privileges to write
Authorization bypass in Canonical LXD (6.0 before 6.10, 5.21.x before 5.21.6, 5.0.x before 5.0.8) lets an authenticated
Project-confinement bypass in Canonical LXD lets an authenticated user holding can_create_instances on a restricted proj
EUVD-2026-64757
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB