# CVE-2026-66897: Instance template path traversal allows arbitrary host file write as root

- Severity: Critical 9.9 (CVSS:3.1, scored by canonical) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.60%, higher than 50% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-24T09:08:04.188Z
- Modified: 2026-10-24T16:10:00.153Z
- Weaknesses: CWE-22, CWE-23
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: canonical

## 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.

(As written by CVE List.)

## Affected

- LXD: from 4.0.0 before 4.0.13; from 5.0.0 before 5.0.9; from 5.21.0 before 5.21.7; from 6.0 before 6.10
- canonical lxd: before 4.0.13; from 5.0.0 before 5.0.9; from 5.1 before 5.21.7; from 6.0 up to 6.9

## References

- <https://github.com/canonical/lxd/security/advisories/GHSA-q39m-8fx9-42fv> (exploit, vdb-entry, vendor-advisory)

## Sources

- CVE List: [CVE-2026-66897](https://www.cve.org/CVERecord?id=CVE-2026-66897), CVE Terms of Use, modified 2026-08-25
- NVD: [CVE-2026-66897](https://nvd.nist.gov/vuln/detail/CVE-2026-66897), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-66897 · Whole record: https://cve.day/CVE-2026-66897.json · Rebuilt by cve.day 2026-11-25T22:59:34.990Z
