Severity:

HIGH RISK

(7.2)

Privilege Escalation (CWE-863) via LXD Snapshot Restore

CVE-2026-9640

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Privilege Escalation to Host Root

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A privilege escalation flaw in LXD's project-restriction handling allows restricted configuration keys to be reintroduced via crafted instance backups and snapshots.

In multi-tenant deployments where project operators can import and restore backups, a malicious snapshot can apply disallowed settings to a live instance, potentially granting unauthorized host-level root access when the instance is started.

Affected context

This vulnerability arises in LXD deployments that use projects to enforce restriction policies in shared or multi-tenant environments.

It is relevant when project operators are allowed to import instance backups and restore snapshots, and where host-level privileges depend on specific configuration keys being blocked by policy.

The issue manifests during snapshot restoration, where configuration applied from the backup may not be revalidated against current project restrictions before becoming active on the running instance.

Exploit preconditions

  • Attack surface: LXD management API or CLI in a multi-tenant environment using projects and restriction policies.
  • Required access: Authenticated project operator (or equivalent role) with permissions to import instance backups and restore snapshots within their project.
  • Trigger point: Importing a maliciously crafted instance backup that embeds restricted configuration keys inside a snapshot, then restoring that snapshot to a live instance.
  • Why exploitation is possible: The snapshot restoration path applies configuration directly from the backup to the instance without re-enforcing or validating project restriction policies, allowing disallowed keys to silently take effect.

Why this happens

The underlying bug is an authorization and policy enforcement gap in LXD's configuration lifecycle, mapped to CWE-863: Incorrect Authorization.

While project restriction policies are designed to prevent certain configuration keys from being set or modified, the snapshot restoration path treats snapshot-stored configuration as trusted and does not reapply the same restrictions.

This inconsistent enforcement creates a bypass: configuration that would normally be rejected when set directly can be smuggled in via backups and snapshots and then applied to a live instance.

Potential impact

  • Project operators may gain unauthorized root access on the host.
  • Containers or virtual machines can be started with elevated or disallowed capabilities and device mappings.
  • Breakout from isolated tenants into the host environment can occur.
  • Security policies and isolation guarantees provided by LXD projects may be undermined.
  • Further lateral movement within the host or other tenants' resources could become possible.

General mitigation guidance

Mitigation generally focuses on enforcing consistent policy validation across all configuration entry points and reducing implicit trust in imported state.

Recommended patterns include:

  • Ensuring that project restriction checks are applied uniformly to configuration changes originating from snapshots, backups, or imports, not just direct API/CLI edits.
  • Treating restored configuration as untrusted input and revalidating it against current policy before activation.
  • Minimizing the scope of permissions granted to project operators, especially around backup import and snapshot restoration capabilities.
  • Using strict profiles and default-deny policies for privileged configuration keys that map to host-level capabilities.
  • Applying least privilege to host-level integrations (devices, mounts, privileges) so that misconfigurations do not automatically result in full host compromise.

How teams detect issues like this

Detection efforts can focus on identifying unauthorized or inconsistent configuration changes and policy bypass patterns.

Common strategies include:

  • Reviewing LXD audit logs for instances where restricted configuration keys appear after snapshot restoration or backup import operations.
  • Implementing policy-as-code checks that periodically scan live instance configurations and compare them against project restriction definitions, flagging violations.
  • Using static configuration analysis or compliance tools to detect risky device mappings, capabilities, or privilege-related keys in backups before import.
  • Incorporating security-focused code reviews on configuration-handling paths, especially around serialization/deserialization, snapshot creation, and restoration logic.
  • Enforcing organizational policies that require automated validation or approval workflows for backup imports and snapshot restores in multi-tenant environments.

Sources

SourceLink
github.comgithub.com/canonical/lxd/pull/18301
github.comgithub.com/canonical/lxd/pull/18303
github.comgithub.com/canonical/lxd/pull/18304
github.comgithub.com/canonical/lxd/security/advisories/GHSA-ppq7-4492-5552

Frequently asked

questions

Exploitation typically requires authenticated access to the LXD management interface (API or CLI) with permissions to import backups and restore snapshots. In many deployments, this is limited to operators or administrators, but such access can be remote if LXD is exposed over the network.

An attacker must be an authenticated project operator (or a similarly privileged tenant user) in a restricted project. They need the ability to import instance backups and restore snapshots, but they do not need direct host-level access beforehand.

The safest approach is to ensure that project restriction policies are applied consistently whenever configuration becomes active, including during snapshot restoration and backup imports. All configuration keys loaded from backups should be revalidated against current project policies before being applied to an instance.

Prevent future issues by treating all restored or imported state as untrusted, enforcing central authorization checks on every configuration mutation path, and adopting policy-as-code practices. Regular security reviews of configuration handling logic and fine-grained permission models for backup and snapshot operations help maintain consistent enforcement.

Find out what's already
exploitable in your codebase.