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.
Published: 2026-08-24
Score: 9.9 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Host Root Code Execution
Action: Immediate Patch
AI Analysis

Impact

The flaw arises in how LXD processes instance template metadata. When a user provides a path for a file in metadata.yaml, LXD checks the path against a confined root directory but later creates the file with an unconfined path string. This mismatch permits a path traversal attack that lets the attacker write to any file on the host, including those owned by root. The result is that an attacker can overwrite critical system files and achieve code execution with root privileges on the host.

Affected Systems

The vulnerability affects Canonical's LXD container hypervisor. Any LXD installation older than the patched releases – LXD 4.0.13, 5.0.9, 5.21.7, and 6.10 – is susceptible. This includes all supported LXD 4.x, 5.x, and 6.x releases prior to those specific patch versions.

Risk and Exploitability

The CVSS score is 9.9, classifying this as critical. Since the EPSS score is not available and the vulnerability is not listed in CISA KEV, the public exploitation likelihood may be unknown, but the high severity indicates that any attacker who can edit a container or launch a crafted image can escape confinement. Local users who have container editing rights, or any user who can supply a malformed metadata.yaml, can trigger the vulnerability, leading to host root compromise. Therefore the risk is substantial for systems that expose LXD to untrusted users or run modules that allow arbitrary image creation.

Generated by OpenCVE AI on August 24, 2026 at 10:22 UTC.

Remediation

Vendor Solution

Upgrade to LXD versions 4.0.13, 5.0.9, 5.21.7, 6.10 or later.


OpenCVE Recommended Actions

  • Upgrade LXD to a patched version—4.0.13, 5.0.9, 5.21.7, 6.10 or later.
  • If an upgrade is temporarily infeasible, restrict container edit permissions to trusted administrators only, denying untrusted users the ability to modify instance metadata.
  • Validate that any image or template metadata does not contain arbitrary file paths before importing or launching containers.
  • Monitor host file integrity and audit container creation logs to detect anomalous file writes.

Generated by OpenCVE AI on August 24, 2026 at 10:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 11 Sep 2026 15:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*

Mon, 24 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 24 Aug 2026 11:15:00 +0000

Type Values Removed Values Added
First Time appeared Canonical
Canonical lxd
Vendors & Products Canonical
Canonical lxd

Mon, 24 Aug 2026 09:30:00 +0000

Type Values Removed Values Added
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.
Title Instance template path traversal allows arbitrary host file write as root
Weaknesses CWE-22
CWE-23
References
Metrics cvssV3_1

{'score': 9.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: canonical

Published:

Updated: 2026-08-25T03:55:49.930Z

Reserved: 2026-07-28T07:41:26.310Z

Link: CVE-2026-66897

cve-icon Vulnrichment

Updated: 2026-08-24T13:00:13.173Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-24T10:16:39.767

Modified: 2026-09-11T15:28:53.323

Link: CVE-2026-66897

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-24T11:00:09Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-23

    Relative Path Traversal