Junglewise Threat Intelligence

CVE-2026-66897: Canonical LXD path traversal in instance template processing

CVE-2026-66897 · Severity: critical · CVSS 9.9 · Published 2026-08-24

Technologies: Canonical LXD. Vendors: Canonical.

Executive brief

LXD is a container management system used to run and manage Linux containers at scale. A path traversal vulnerability in its template processing allows users with container edit permissions to overwrite arbitrary files on the host system as root, leading to complete system compromise. This affects any LXD deployment where users are allowed to edit containers or launch custom images.

Technical details

A path traversal vulnerability exists in LXD's instance template file processing (templateApplyNow function). The vulnerability stems from a mismatch between path validation and file creation: template target paths from metadata.yaml are validated using a confined os.Root handle against the instance rootfs, but the file is subsequently created using os.Create with an unconfined string path. An attacker can bypass the confinement check by routing the traversal path through a non-existent directory component (which causes os.Root.Stat to return ENOENT—treated as a success case), then leveraging filepath.Join's lexical normalization to strip the ".." components before passing the escaped path to os.Create. This allows arbitrary file writes as root on the host. The vulnerability requires either container edit permissions (can_edit capability) or the ability to launch a crafted container image, and affects LXD versions through 6.9.

Affected products

  • Canonical LXD <=6.9

Timeline

  • 2026-08-24: disclosed
  • 2026-08-24: patched: Patched in versions 4.0.13, 5.0.9, 5.21.7, 6.9-ab8fad2, and 6.10

References

Related threats