CVE-2026-66897
Received Received - Intake

Path Traversal in LXD Container Template Processing

Vulnerability report for CVE-2026-66897, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-24

Last updated on: 2026-08-24

Assigner: Canonical Ltd.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-24
Last Modified
2026-08-24
Generated
2026-08-24
AI Q&A
2026-08-24
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
canonical lxd to 6.9 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-23 The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a path traversal vulnerability in LXD's instance template processing. An attacker with container edit permissions or a user launching a crafted image can overwrite arbitrary files on the host system as root. The issue occurs because LXD validates the path against a confined directory but then uses an unconfined path for file creation, allowing escape from directory confinement.

Detection Guidance

Check LXD version with 'lxd --version' and inspect container templates for suspicious metadata.yaml files. Review file writes to host directories outside containers using auditd or sysmon logs.

Impact Analysis

An attacker could overwrite critical system files, leading to root-level code execution. This could allow full control of the host system, compromise of sensitive data, and disruption of services. Systems running vulnerable LXD versions are at risk if an attacker gains container edit access or can deploy crafted images.

Compliance Impact

This vulnerability could lead to unauthorized access, data breaches, or system compromise, violating compliance requirements for data protection and security. GDPR and HIPAA mandate strict controls to prevent unauthorized access to sensitive data, which this flaw could facilitate.

Mitigation Strategies

Upgrade LXD to the latest patched version immediately. Restrict container edit permissions to trusted users only. Monitor for unauthorized file writes on the host system.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-66897. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart