CVE-2026-66897Canonical Lxd Path Traversal
NVDCVSS scored by security@ubuntu.com
Vulnerability Summary
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.
CVSS v3.1 Base Metrics — Score 9.9 (CRITICAL)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
Affected & Patched Versions
- Canonical Lxd < 4.0.13
- Canonical Lxd >= 5.0.0 and < 5.0.9
- Canonical Lxd >= 5.1 and < 5.21.7
- Canonical Lxd >= 6.0 and <= 6.9
- Canonical LXD >= 4.0.0 and < 4.0.13
- Canonical LXD >= 5.0.0 and < 5.0.9
- Canonical LXD >= 5.21.0 and < 5.21.7
- Canonical LXD >= 6.0 and < 6.10
- Canonical Lxd 4.0.13
- Canonical Lxd 5.0.9
- Canonical Lxd 5.21.7
- Canonical LXD 4.0.13
- Canonical LXD 5.0.9
- Canonical LXD 5.21.7
- Canonical LXD 6.10
What to do
Prioritize this fix. Exploit code is public, so attacks can follow quickly.
- Check whether you run Canonical Lxd and which version.
- Update to a patched version listed above, then confirm the new version.
- Review logs and exposed services for signs of earlier compromise.
Timeline
- Aug 24, 2026Published
- Oct 24, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Canonical Lxd CVEsYou are reading CVE-2026-66897. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 27, 2026 23:15 UTC