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.

