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

Critical 9.9 Published Updated

Attackers can overwrite host files as root via path traversal in LXD instance templates, leading to host code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-66897?

CVE-2026-66897 is a critical path traversal vulnerability in Canonical LXD, published on 24 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-23, CWE-22

Which versions are affected by CVE-2026-66897?

It affects 1 product.

Products include Canonical Lxd.

How do I fix CVE-2026-66897?

No fix has been published for CVE-2026-66897 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-66897 being exploited?

There is no known exploitation of CVE-2026-66897 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-66897, GHSA-q39m-8fx9-42fv, UBUNTU-CVE-2026-66897.

Is CVE-2026-66897 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free