Canonical LXD
CVE-2026-28384
CRITICAL
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable API, low complexity, requires a low-privilege authenticated LXD user (PR:L); command execution as the root daemon escapes the user's authorization context (S:C) with full C/I/A impact.
Primary rating from Vendor (ubuntu).
CVSS VectorVendor: ubuntu
Lifecycle Timeline
6DescriptionCVE.org
An improper sanitization of the compression_algorithm parameter in Canonical LXD allows an authenticated, unprivileged user to execute commands as the LXD daemon on the LXD server via API calls to the image and backup endpoints. This issue affected LXD from 4.12 through 6.6 and was fixed in the snap versions 5.0.6-e49d9f4 (channel 5.0/stable), 5.21.4-1374f39 (channel 5.21/stable), and 6.7-1f11451 (channel 6.0 stable). The channel 4.0/stable is not affected as it contains version 4.0.10.
AnalysisAI
Remote code execution in Canonical LXD 4.12 through 6.6 lets an authenticated but unprivileged LXD API user run arbitrary commands as the root-level LXD daemon by injecting shell content into the compression_algorithm parameter of the image-publish and backup-export endpoints. The daemon passed this attacker-supplied string to a compression command lookup without allowlisting it, turning a routine 'choose your compressor' option into full host takeover. No public exploit is identified at time of analysis and EPSS is low (0.12%), but the root cause is confirmed by Canonical's own security advisory and upstream commits.
Technical ContextAI
LXD is Canonical's container and virtual-machine manager exposed over a REST API (cpe:2.3:a:canonical:lxd). When creating an image (imagesPost) or exporting an instance/volume backup (instanceBackupsPost, storagePoolVolumeTypeCustomBackupsPost), the client may specify a compression_algorithm; LXD's compressFile helper split this string and used field[0] as an executable to look up and run. Because the value was never validated (CWE-78, OS Command Injection), an attacker could smuggle additional command tokens instead of a legitimate compressor name. The fix (commit 043696a…) introduces validate.IsCompressionAlgorithm with a strict allowlist - bzip2, gzip, lzma, pigz, pzstd, squashfs, xz, zstd - rejecting anything else before exec.LookPath is called, and a regression test confirms 'lxc publish --compression=ls' is now rejected.
RemediationAI
Upgrade to a patched snap: 5.0.6-e49d9f4 (5.0/stable), 5.21.4-1374f39 (5.21/stable), or 6.7-1f11451 (6.0/stable) - snap refresh will pull the fixed build for your channel; deployments already on 4.0/stable (4.0.10) are unaffected. If immediate patching is not possible, restrict who holds LXD API/trust credentials and revoke access for lower-trust users, since exploitation requires authenticated API access to the image and backup endpoints; because the vulnerable parameter is a legitimate API option there is no safe feature toggle short of blocking untrusted callers, and tightening trust removes convenience for those users. Reference Canonical's advisory GHSA-4rmf-rcp8-2r9g and the fix commits (043696a13171ace7dd4c2b32d34ce039ab629052, 7046979645c2ce1b63b2f9e60ddf6cbc4c4b78f9, b7b411caf5c4971bfe2386c72128f44d7e2aaf4f).
Cross-Site Request Forgery (CSRF) in LXD-UI in Canonical LXD versions >= 5.0 on Linux allows an attacker to create and s
Privilege Escalation in operations API in Canonical LXD <6.5 on multiple platforms allows attacker with read permissions
Information Spoofing in devLXD Server in Canonical LXD versions 4.0 and above on Linux container platforms allows attack
Path Traversal in the log file retrieval function in Canonical LXD 5.0 LTS on Linux allows authenticated remote attacker
A arbitrary file access vulnerability (CVSS 6.5) that allows an attacker with instance configuration permissions. Risk
Privilege escalation to host root in Canonical LXD occurs when the container manager unpacks crafted image or backup arc
Host root code execution in Canonical LXD arises from a path-traversal flaw in instance template processing, letting an
Arbitrary host file read and write in Canonical LXD occurs because the image import/unpack routine does not verify wheth
Canonical LXD's NVIDIA GPU passthrough configuration handler fails to sanitize newline characters in user-supplied `nvid
Path traversal in Canonical's LXD container and VM manager allows a user with backup import/restore privileges to write
Authorization bypass in Canonical LXD (6.0 before 6.10, 5.21.x before 5.21.6, 5.0.x before 5.0.8) lets an authenticated
Project-confinement bypass in Canonical LXD lets an authenticated user holding can_create_instances on a restricted proj
Same weakness CWE-78 – OS Command Injection
View allSame technique Command Injection
View allShare
External POC / Exploit Code
Leaving vuln.today