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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 4.0.13, 5.0.9, 5.21.7, 6.10 (CNA); fix release not confirmed
- Status: published
- Published: 2026-08-24 · Modified: 2026-08-25
- Aliases: UBUNTU-CVE-2026-66897, DEBIAN-CVE-2026-66897
- Record: https://cvemate.com/vulnerability/CVE-2026-66897 · JSON: https://cvemate.com/vulnerability/CVE-2026-66897/json

## Description

```text
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.
```

## Signals

- CVSS: 9.9 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- EPSS: 0.604%, percentile 50.38%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- canonical lxd: ≥ 4.0.0, \< 4.0.13 \| ≥ 5.21.0, \< 5.21.7 \| ≥ 6.0, \< 6.10 \| \< 4.0.13 \| ≥ 5.0.0, \< 5.0.9 \| ≥ 5.1, \< 5.21.7 \| ≥ 6.0, ≤ 6.9
- debian lxd (Debian): All versions (No fix recorded)
- ubuntu lxd (Ubuntu): All versions (No fix recorded)

## References

- <https://github.com/canonical/lxd/security/advisories/GHSA-q39m-8fx9-42fv>
- <https://ubuntu.com/security/CVE-2026-66897>
- <https://www.cve.org/CVERecord?id=CVE-2026-66897>
- <https://security-tracker.debian.org/tracker/CVE-2026-66897>

---

Data as of 2026-12-05T14:09:36.863Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
