Vulnerability · Published May 6, 2026 · Assigned by GitHub_M
CVE-2026-40251Incus out-of-bounds panic in snapshot metadata handling allows denial of service
High 7.1
In plain English
A high-severity security flaw in incus from lxc. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Incus is a system container and virtual machine manager. In versions before 7.0.0, missing validation logic in the storage volume import logic allows an authenticated user with access to the storage volume feature to cause the Incus daemon to crash. The backup restore subsystem contains an out-of-bounds panic vulnerability caused by an invalid bounds check when indexing snapshot metadata arrays, and the same flawed pattern also appears in the migration path. When iterating through physical snapshots provided in a backup archive, the loop uses the index to look up corresponding metadata in the parsed `Config.Snapshots` and `Config.VolumeSnapshots` slices. The guard condition `len(slice) >= i-1` is incorrect because it can still evaluate to true when the subsequent slice[i] access is out of bounds. An attacker can submit a backup archive that contains physical snapshot directories while supplying a tampered `index.yaml` with an empty or truncated snapshot metadata array, causing the daemon to index beyond the end of the metadata slice and crash. Repeated use of this issue can be used to keep Incus offline, causing a denial of service. This issue is fixed in version 7.0.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | incus | 7.0.0-r0 | ALPINE-CVE-2026-40251 |
| Debian:13 | incus | 6.0.4-2+deb13u7 | DEBIAN-CVE-2026-40251 |
| Debian:14 | incus | 7.0.0-1 | DEBIAN-CVE-2026-40251 |
| Debian:12 | lxd | no fix listed | DEBIAN-CVE-2026-40251 |
| Debian:13 | lxd | 5.0.2+git20231211.1364ae4-9+deb13u6 | DEBIAN-CVE-2026-40251 |
| Go | github.com/lxc/incus | no fix listed | GO-2026-5127 |
| Go | github.com/lxc/incus/v6 | no fix listed | GO-2026-5127 |
| Go | github.com/lxc/incus/v6/cmd/incusd | 7.0.0 | GHSA-4m88-wxj4-9qj6 |
| Go | github.com/lxc/incus/v7 | 7.0.0 | GO-2026-5127 |
| Ubuntu:25.10 | incus | no fix listed | UBUNTU-CVE-2026-40251 |
| Ubuntu:26.10 | incus | no fix listed | UBUNTU-CVE-2026-40251 |
Affected products (as reported)
Weakness: CWE-129 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
References
- https://github.com/lxc/incus/security/advisories/GHSA-4m88-wxj4-9qj6 x_refsource_CONFIRM
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/storage/backend.go x_refsource_MISC