Instance template path traversal allows arbitrary host file write as root (Canonical LXD)

CVE-2026-66897
CRITICAL 9.9

At a glance

Source
NVD
EPSS
EPSS 0.72 % · percentile 54 ()
State
PUBLISHED
Published
Updated
Assigner
canonical
NVD status
Analyzed

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.

Weaknesses (CWE)

  • CWE-22 — Improper Limitation of a Pathname to a Restricted Directory
  • CWE-23 — Relative Path Traversal

References

Scores

VersionScoreVectorScored by
CVSS 3.1CRITICAL 9.9CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:Hcanonical
CVSS 3.1CRITICAL 9.9CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HNVD · security@ubuntu.com (Secondary)

European references

Affected configurations (NVD CPE)

Affected products

ProductVersions
Canonical · LXDaffected 4.0.0 < 4.0.13 ; affected 5.0.0 < 5.0.9 ; affected 5.21.0 < 5.21.7 ; affected 6.0 < 6.10

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD