CVE-2026-140085: lxd: Uncontrolled search path element in run-host HOME handling allows local privilege escalation to root
Uncontrolled search path element in the run-host command wrapper in Canonical LXD 6.10 before 6.10.2 allows any local user to execute arbitrary code as root via a Python per-user site directory planted under the host's world-writable /tmp, which the root-run pro client imports at the next LXD daemon start because the snap launcher exports HOME=/tmp/ and run-host does not reset it for host commands.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Canonical LXD 6.10 releases before 6.10.2 are affected. Exploitation requires a local user on the LXD host and relies on the host's world-writable /tmp directory.
What does an attacker need to do to exploit it?
A local user must plant a Python per-user site directory under /tmp. When the LXD daemon next starts, the root-run pro client can import attacker-controlled code because HOME remains set to /tmp/ for the host command.
When does the malicious code execute?
Execution occurs at the next LXD daemon start, when the affected root-run client imports the planted Python code. The provided information does not state that code executes immediately after the files are planted.