On this page (7 sections)
A GitHub security advisory describes an arbitrary file write flaw in the Go package github.com/canonical/lxd. When the daemon is asked to fetch an image from a URL, it trusts a hash value returned by the remote image server. According to the advisory, a malicious image server can use that value to make the daemon write a file outside its image directory, which can lead to arbitrary command execution as root.
If you run LXD or Incus hosts, check whether they fetch images from URLs that an untrusted party could control. Details are thin: the advisory lists no CVE identifier and no CVSS score in our research, and only one source covers it so far.
What the advisory says happened
According to the GitHub advisory, published June 26, 2026 and updated November 6, 2026, the problem sits in how the daemon handles an image request whose source type is a URL. The daemon first sends a HEAD request to the user-supplied URL and reads two response headers, one carrying an image hash and one carrying an image URL. It then uses the hash, by default, as the name of the file it saves the download to.
The advisory says the SHA-256 check happens only after the file has already been created and filled with the downloaded data. A hash value containing directory traversal sequences therefore escapes the intended image directory. It adds that cleanup runs only after the copy finishes, so a slow or held-open response lengthens the window in which the written file exists.
The weakness in plain terms
This is a path traversal combined with a validate-too-late mistake. Input from a remote party (the hash) is used to build a file path, and the integrity check meant to constrain it runs after the file has already been written. The advisory's sample malicious header points at a file under /etc/cron.d, a system scheduled-task location, as the route to command execution as root. Because the advisory describes the hash as escaping the image directory, other locations the daemon can write to could in principle be targeted too; the research does not list them.
The advisory includes a proof-of-concept script, noted as generated by an LLM. We are not reproducing it or the crafted header value here. The vector the advisory describes is a malicious image server returning the crafted header.
Who is exposed
Based on the advisory, exposure comes down to two conditions:
- The host runs LXD or Incus code older than the patched version listed above.
- The host can be made to request an image from a URL served by a malicious image server.
A host that only uses image servers you operate and trust has a smaller exposure on the second point, but updating is still the right answer. Which of your tools and release numbers correspond to the affected code is not stated in the research.
How to check your exposure
The advisory's version string is a Go pseudo-version. Distribution packages, snaps and source builds label versions differently, and the research gives no mapping to release numbers. These read-only checks show what you are running.
lxc versionincus versiondpkg -l | grep -Ei 'lxd|incus'rpm -qa | grep -Ei 'lxd|incus'If you installed through snap or built from source, these package listings will not show it, so use the version commands and your install method's own tooling. Then ask your distributor or the project which release contains the fix. Until that is confirmed, treat the host as potentially exposed.
What to do now
- Identify every host running LXD or Incus, including build and test machines.
- Find out from your distributor or the project's release notes which build contains the fix (0.0.0-20260630083100-c5184be310b1 or later for the Go module), and update using the method you installed with.
- Until patched, avoid fetching images from URLs you do not control.
- Prefer image servers you operate or trust, and consider restricting the daemon's outbound access to them (general hardening, not from the advisory).
- Review scheduled-task directories and the image directory for files you did not create (see below).
Detection and monitoring
The advisory's sample header targets a file in /etc/cron.d, and the file may exist only transiently. This read-only command lists that directory by modification time so you can spot entries you did not create. It checks only the one location from the sample, so also review other places an attacker could write.
ls -lat /etc/cron.dBeyond that, review daemon logs for image fetches from unfamiliar URLs and consider alerting on new files under system configuration directories. If you find something you cannot explain, follow a hacked-system response plan and rebuild the host from a known good state rather than cleaning it in place.
If the hosts serve public sites, outside-in checks such as a free malware scan or certificate and DNS monitoring can catch downstream effects, though they cannot see a file written on the host itself.
What is still unknown
- No CVE identifier or CVSS score appears in the research; Critical is the GitHub advisory's own label.
- Whether the flaw is exploited in the wild is not stated.
- The mapping from the Go pseudo-version to LXD and Incus release numbers is not given.
- Only one source covers this so far, and the advisory text in our research was truncated.
We will update this article if a CVE, score or vendor release notes appear.
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
