On this page (7 sections)
A critical flaw in LXD, the system container and VM manager maintained under the canonical/lxd repository, lets a specially crafted image read or write arbitrary files on the host. The advisory warns this could possibly lead to arbitrary command execution. It was published in the GitHub Advisory Database as GHSA-vghh-5rfx-xhq8 and rated Critical, with a CVSS score of 9.9.
If you run LXD on a server that hosts websites, or you let other people import or launch images, you should check your version and review where your images come from. So far only one source covers this story, and it is the advisory itself, so some details remain unconfirmed.
What happened
According to the advisory, a malicious image can include a top-level rootfs entry that is a symbolic link pointing at a host path, for example the host root directory. The advisory says the image passes validation, and that the link is processed later during full extraction. Once a container is created from that image, the file API for stopped containers can end up working against the host filesystem instead of the container's own files.
The advisory describes the practical result as access to the host's filesystem with root privileges. Its proof of concept demonstrates reading a sensitive host file and creating a file in the host root. We are not reproducing that here. The key point for defenders is that the damage comes from an untrusted image, not from a bug in your own containers.
How the weakness works
This is a symlink handling problem, classed as CWE-73. A symbolic link is a filesystem entry that points somewhere else. If software trusts a path inside an untrusted archive and then follows a link to a location outside the intended directory, the archive author effectively chooses which host files get touched.
The advisory explains the sequence this way: validation looks for an ordinary metadata file and a rootfs directory entry and accepts the image. Full extraction can later handle a duplicate top-level rootfs symlink. The stopped-container file API then opens the root filesystem path and hands that file descriptor to a helper process called forkfile, which changes root into it. Because the path now resolves to the host, the helper operates on the host.
Who is exposed
The CVSS vector lists network attack vector, low complexity, low privileges required, no user interaction and a changed scope. In plain terms, an attacker needs some ability to get an image into your LXD and use the container file API, but not administrator rights, and a successful attack crosses from the container boundary into the host.
- Shared or multi-tenant LXD hosts where unprivileged or semi-trusted users can import images or create containers.
- Hosting providers and agencies that build containers from third-party or customer-supplied images.
- CI systems and automation that pull images from remote or unverified sources.
- Single-admin servers that only use images from sources you control are at lower practical risk, but should still update.
The research does not say which distribution packages or release channels carry the fix, only the patched Go module version. Confirm with your distribution or the LXD project how that maps to the build you run.
How to check your exposure
Start by finding out which LXD build is installed and where it came from. The research does not give a version command, so the checks below are standard package-manager and snap queries. Run the one that matches how LXD was installed on the host, then compare the result with your vendor's advisory or changelog. Package versions rarely look like the Go module version in the advisory, so a direct string comparison will not work.
snap list lxdapt list --installed lxdrpm -q lxdEach command only reads package information and changes nothing. If it reports nothing, LXD is probably installed another way, or not at all. Then review which images exist on the host. The standard LXD client lists local images with the command below; if you use Incus instead, the equivalent is incus image list. Look at the alias, fingerprint, upload date and description of each image. Anything you do not recognize, or that was imported by a user who should not be importing images, deserves a closer look.
lxc image listWhat to do now
- Update LXD to a build that includes the fix (module version 0.0.0-20260630083100-c5184be310b1 or later) using your distribution or snap channel.
- Confirm the update with your vendor's notes, since the research gives only the Go module version.
- Review local images and remove ones you cannot trace to a trusted source.
- Restrict who can import images and create containers, especially on shared hosts.
- Import images only from sources you control or verify.
- Review host files that matter (user accounts, SSH keys, cron, service units) for unexpected changes if untrusted images were ever used.
- Rotate credentials stored on the host if you suspect an untrusted image was used.
Detection and monitoring
The research does not describe indicators of compromise. Sensible checks are general ones: review LXD logs and your shell or audit history for unexpected image imports, container creation and file pull or push operations against stopped containers. Compare file integrity on sensitive host paths against a known good baseline.
If the host also serves websites, watch the sites for unexpected changes after any suspected exposure. A free malware scanner gives an outside view, and Webforta Monitor can alert you to certificate, DNS and header changes. Neither can see inside an LXD host, so they complement and do not replace host-level review. For a broader plan, see website hacked: what to do.
Timeline
| Date | Event |
|---|---|
| Jun 26, 2026 | Advisory published in canonical/lxd |
| Nov 6, 2026 | Published to the GitHub Advisory Database, reviewed and last updated |
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.
