CVE-2026-127152 in LXD
Summary
by MITRE • 11/27/2026
Improper privilege management during container rebuild in Canonical LXD before 5.21.10, 6.10.2 allows a local user with container permissions to gain root privileges on the host via rebuilding a never-started unprivileged container so it starts without a user namespace or privileged-container hardening.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/27/2026
The vulnerability identified in Canonical LXD prior to versions 5.21.10 and 6.10.2 represents a critical failure in privilege management during the lifecycle operations of containers, specifically affecting unprivileged container instances that have never been started. This flaw allows a local user who possesses permissions to manage or interact with such containers to escalate their privileges from an isolated environment to full root access on the underlying host system. The core technical issue stems from how LXD handles the initialization and configuration state of containers that exist in storage but lack any prior runtime execution history. When these specific unprivileged containers are rebuilt, the security mechanisms designed to enforce isolation fail to properly apply necessary hardening measures, particularly regarding user namespaces and privileged container restrictions.
In a typical secure deployment of Linux Containers, LXD relies heavily on user namespaces to map root privileges inside the container to an unprivileged UID on the host, thereby preventing any direct interaction with host kernel resources or system calls that require elevated permissions. This isolation is further reinforced by disabling privileged mode for standard containers and applying AppArmor profiles to restrict access to sensitive files and devices. However, in this specific scenario involving a never-started unprivileged container undergoing a rebuild operation, the software fails to correctly re-establish these security boundaries. The rebuilding process inadvertently strips away or bypasses the user namespace mapping and disables the privileged-container hardening features that should remain active even for unprivileged instances. This creates a state where the container effectively runs with host-level privileges despite being configured as an unprivileged instance.
The operational impact of this vulnerability is severe, as it constitutes a complete break in the security model provided by LXD. An attacker who has access to a local account on the host machine and can create or modify containers within their designated scope can exploit this flaw to gain unrestricted root access to the host operating system. This level of privilege escalation enables the attacker to read sensitive data, install persistent backdoors, pivot to other systems on the network, and completely compromise the integrity and availability of the infrastructure hosting the LXD daemon. Since the vulnerability affects containers that have never been started, it is particularly insidious because standard monitoring tools might not flag unusual activity associated with a container that has no prior runtime history or resource usage patterns.
This flaw aligns with CWE-269, Improper Privilege Management, as the system fails to maintain appropriate access control levels during state transitions involving container configuration changes. Furthermore, it maps directly to MITRE ATT&CK technique T1068, Exploitation for Privilege Escalation, where an adversary leverages a software vulnerability to gain higher-level permissions on a compromised host or network component. The specific mechanism of bypassing user namespace isolation also relates to CWE-250, Execution with Unnecessary Privileges, as the container process executes with more privileges than are necessary for its intended function.
Mitigation strategies must prioritize immediate patching to ensure that all LXD instances are updated to version 5.21.10 or later, which includes fixes for this privilege escalation vector. Administrators should also review their current deployment configurations to ensure that unprivileged containers are strictly enforced and that no legacy configurations allow for the bypass of user namespaces. Regular auditing of container states and rebuild operations can help detect anomalies indicative of exploitation attempts. Additionally, implementing strict network segmentation between host management interfaces and container workloads adds a layer of defense-in-depth, limiting the blast radius should such a vulnerability be exploited in environments where patching cannot occur immediately.