SECURITYCRITICALCVE-2026-66897

CVE-2026-66897: Critical LXD Path Traversal Allows Host File Overwrite

A CVSS 9.9 path traversal flaw in LXD's template processing lets attackers with container permissions overwrite arbitrary host files.

Dylan H.

Security Team

August 25, 2026
3 min read
CVE-2026-66897: Critical LXD Path Traversal Allows Host File Overwrite

Critical severity

Rated critical. Prioritise patching — see the remediation guidance below.

Affected Products

  • LXD container manager

Overview

A critical path traversal vulnerability (CVE-2026-66897) has been disclosed in LXD, the popular Linux container and virtual machine manager maintained by Canonical. Rated CVSS 9.9, the flaw allows an attacker with container edit permissions — or any user who can cause a victim to launch a crafted container image — to overwrite arbitrary files on the host system.

The vulnerability resides in LXD's instance template processing engine, which fails to properly sanitize file paths when extracting image templates. By embedding a maliciously crafted path (e.g., ../../etc/cron.d/malicious) inside an LXD image, an attacker can escape the container boundary and write to any location accessible by the LXD daemon on the host.

Technical Details

FieldValue
CVE IDCVE-2026-66897
CVSS Score9.9 (Critical)
Attack VectorNetwork
Privileges RequiredLow (container edit access)
User InteractionNone (or victim launches image)
ScopeChanged — host escape from container
ComponentLXD instance template processor

Attack Scenarios

Scenario 1 — Container Edit Privileges:
An attacker with legitimate (or compromised) permissions to edit LXD instances can modify an instance's template configuration to include path-traversal sequences. On next template application, the daemon writes attacker-controlled content to arbitrary host paths.

Scenario 2 — Crafted Image Distribution:
An attacker distributes a malicious LXD image via a community repository or internal image registry. Any user or automation system that pulls and launches the image triggers the traversal without requiring explicit container-edit privileges.

Both vectors ultimately achieve host file overwrite, enabling privilege escalation, persistence (e.g., writing cron jobs, SSH keys, or sudoers entries), or service disruption.

Affected Versions

All LXD versions prior to the patched release are affected. Canonical has published a fix; operators should update immediately via:

snap refresh lxd

For non-snap installations, consult your distribution's package manager or the upstream LXD release notes.

Mitigation

  1. Update LXD immediately to the latest patched version.
  2. Audit container edit permissions — restrict who can modify instance configurations in multi-tenant or shared environments.
  3. Enforce image signing and provenance — only pull images from trusted, verified sources. Avoid untrusted community images until they can be reviewed.
  4. Review LXD daemon privileges — consider restricting the daemon's write access on the host filesystem where possible.
  5. Monitor for unexpected host file changes — deploy file integrity monitoring (FIM) on critical host paths (/etc/, /root/.ssh/, /var/spool/cron/).

Severity Rationale

The near-perfect CVSS score of 9.9 reflects the Changed scope (container-to-host escape), low privilege requirement (any container user with edit access), and the critical impact on host confidentiality, integrity, and availability. Container escape vulnerabilities of this class are considered among the most severe in cloud and infrastructure environments.

References