GHSA-3G2J-VM47-X4MJ

GHSA-3G2J-VM47-X4MJ is a high-severity improper privilege management vulnerability in github.com/canonical/lxd (go), affecting versions < 0.0.0-20251110144034-698854d0164f. It is fixed in 0.0.0-20251110144034-698854d0164f.

Summary

Impact

This affects any LXD user in an environment where an unprivileged user may have root access to a container with an attached custom storage volume that has the security.shifted property set to true as well as access to the host as an unprivileged user.

The most common case for this would be systems using lxd-user with the less privileged lxd group to provide unprivileged users with an isolated restricted access to LXD. Such users may be able to create a custom storage volume with the necessary property (depending on kernel and filesystem support) and can then write a setuid binary from within the container which can be executed as an unprivileged user on the host to gain root privileges.

Patches

Patches for this issue are available:

The first commit changes the permissions for any new storage pool, the later commit adds a patch that applies it on startup to all existing storage pools.

These fixes are also available in the associated candidate snap channels for each LTS series:

  • 5.21/candidate (5.21.4-8a3cf61)
  • 5.0/candidate (5.0.5-5c60378)
  • 4.0/candidate (4.0.10-35a8127)

We will be preparing intermediate releases to the associated stable snap channels shortly.

Workarounds

Permissions can be manually restricted until a patched version of LXD is deployed.

This is done with:

sudo nsenter --mount=/run/snapd/ns/lxd.mnt -- chmod 0700 /var/snap/lxd/common/lxd/storage-pools/*/{custom*,virtual-machines*,images}
sudo nsenter --mount=/run/snapd/ns/lxd.mnt -- chmod 0711 /var/snap/lxd/common/lxd/storage-pools/*/{containers*,buckets*}

Those are the same permissions which will be applied by the patched LXD for both new and existing storage pools.

References

This was reported to Incus publicly on Github here:

Impact

The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access. Typical impact: privilege escalation beyond the intended level.

Affected versions

github.com/canonical/lxd (< 0.0.0-20251110144034-698854d0164f)

Security releases

github.com/canonical/lxd → 0.0.0-20251110144034-698854d0164f (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/canonical/lxd to 0.0.0-20251110144034-698854d0164f or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-3G2J-VM47-X4MJ? GHSA-3G2J-VM47-X4MJ is a high-severity improper privilege management vulnerability in github.com/canonical/lxd (go), affecting versions < 0.0.0-20251110144034-698854d0164f. It is fixed in 0.0.0-20251110144034-698854d0164f. The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access.
  2. Which versions of github.com/canonical/lxd are affected by GHSA-3G2J-VM47-X4MJ? github.com/canonical/lxd (go) versions < 0.0.0-20251110144034-698854d0164f is affected.
  3. Is there a fix for GHSA-3G2J-VM47-X4MJ? Yes. GHSA-3G2J-VM47-X4MJ is fixed in 0.0.0-20251110144034-698854d0164f. Upgrade to this version or later.
  4. Is GHSA-3G2J-VM47-X4MJ exploitable, and should I be worried? Whether GHSA-3G2J-VM47-X4MJ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-3G2J-VM47-X4MJ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-3G2J-VM47-X4MJ? Upgrade github.com/canonical/lxd to 0.0.0-20251110144034-698854d0164f or later.

Other vulnerabilities in github.com/canonical/lxd

CVE-2026-34177CVE-2026-34178CVE-2026-34179CVE-2026-3351CVE-2025-54286

Stop the waste.
Protect your environment with Kodem.