In Canonical LXD before 6.8, the backup import path validates project restrictions against backup/index.yaml in the supplied tar archive but creates the instance from backup/container/backup.yaml, a separate file in the same archive that is never checked against project restrictions. An authenticated remote attacker with instance-creation permission in a restricted project can craft a backup archive where backup.yaml carries restricted settings such as security.privileged=true or raw.lxc directives, bypassing all project restriction enforcement and allowing full host compromise.
During import of a tar archive containing an LXD backup, project restriction validation is performed only based on the backup/index.yaml file. The backup/container/backup.yaml file — actually used for instance restoration — is never verified. An attacker can craft an archive where backup.yaml contains privileged settings, such as security.privileged=true or raw.lxc directives, which would normally be blocked by project restrictions. As a result, the instance is created with these disallowed settings, bypassing all project policy enforcement mechanisms.
An attacker can launch a privileged container instance with access to host resources, leading to full compromise of the host system — violations of confidentiality, integrity, and availability of data and infrastructure.
Canonical LXD must be updated to version 6.8 or newer. Patch details are available in the pull request and in the vendor's security advisory at https://github.com/canonical/lxd/security/advisories/GHSA-q96j-3fmm-7fv4
Canonical LXD in versions earlier than 6.8
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:HCanonical Lxd
APPCanonical4.12 – 5.0.65.21.0 – 5.21.46.0 – 6.7
Related vulnerabilities
Canonical LXD — privilege escalation przez niekompletną listę blokad VM
Canonical LXD: privilege escalation do admina klastra przez brak walidacji pola Type
LXD: privilege escalation przez przywracanie snapshotów z pominięciem polityk
Canonical LXD: nieuprawniony dostęp do woluminów innych gości przez /dev/lxd
Privilege Escalation in operations API in Canonical LXD <6.5 on multiple platforms allows attacker with read p...