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.

The advisory text and its proof of concept refer to Incus, and the report was carried over from another advisory (GHSA-2q3f-q5pq-g8wv). The research does not explain how Incus and LXD relate here, so if you run Incus as well, read the advisory directly and check with your vendor.

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.

Show the installed LXD snap and its channel (hosts that installed LXD as a snap)Shell
snap list lxd
Show the installed LXD package version (Debian/Ubuntu hosts that installed LXD from a deb package)Shell
apt list --installed lxd
Show the installed LXD package version (RHEL-family hosts that installed LXD from an rpm package)Shell
rpm -q lxd

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

List images stored on this host (standard LXD client; read-only)Shell
lxc image list

What to do now

  1. Update LXD to a build that includes the fix (module version 0.0.0-20260630083100-c5184be310b1 or later) using your distribution or snap channel.
  2. Confirm the update with your vendor's notes, since the research gives only the Go module version.
  3. Review local images and remove ones you cannot trace to a trusted source.
  4. Restrict who can import images and create containers, especially on shared hosts.
  5. Import images only from sources you control or verify.
  6. Review host files that matter (user accounts, SSH keys, cron, service units) for unexpected changes if untrusted images were ever used.
  7. Rotate credentials stored on the host if you suspect an untrusted image was used.
Caution. Updating LXD may restart the daemon. Schedule the change and check how your containers behave on daemon restart before applying it on a production host.
Tip. If you cannot patch immediately, reduce risk by blocking image imports for non-administrators and avoiding any image you did not build or verify. These are general hardening steps, not a vendor-confirmed workaround.

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

Dates as shown in the GitHub advisory
DateEvent
Jun 26, 2026Advisory published in canonical/lxd
Nov 6, 2026Published to the GitHub Advisory Database, reviewed and last updated
The patched version string contains 20260630, which suggests a build from June 30, 2026, but the research does not state a release date for the fix. The advisory credits antifob as reporter and stgraber as coordinator.

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.

  1. GHSA-vghh-5rfx-xhq8 - GitHub Advisory Databasegithub.com ·
  • LXD
  • containers
  • symlink
  • GitHub advisory
  • Canonical
  • Linux