# CVE-2026-40251: Incus out-of-bounds panic in snapshot metadata handling allows denial of service

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 7.0.0 (CNA); fix release not confirmed
- Status: published
- Published: 2026-05-06 · Modified: 2026-05-07
- Aliases: UBUNTU-CVE-2026-40251, DEBIAN-CVE-2026-40251, GHSA-4m88-wxj4-9qj6, GO-2026-5127, ALPINE-CVE-2026-40251
- Record: https://cvemate.com/vulnerability/CVE-2026-40251 · JSON: https://cvemate.com/vulnerability/CVE-2026-40251/json

## Description

```text
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.
```

## Signals

- CVSS: 7.1 high (v4.0, CVE.org) 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
- EPSS: 0.424%, percentile 38.664%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine incus (Alpine Linux): \< 7.0.0-r0
- alpine incus-feature (Alpine Linux): \< 7.0.0-r0
- debian incus (Debian): \< 6.0.4-2+deb13u7 \| \< 7.0.0-1
- debian lxd (Debian): All versions (No fix recorded) \| \< 5.0.2+git20231211.1364ae4-9+deb13u6
- ubuntu incus (Ubuntu): All versions (No fix recorded)
- ubuntu lxd (Ubuntu): All versions (No fix recorded)
- github.com/lxc incus (Go): All versions (No fix recorded)
- github.com/lxc/incus v6 (Go): All versions (No fix recorded)
- github.com/lxc/incus v7 (Go): \< 7.0.0
- github.com/lxc/incus/v6/cmd incusd (Go): \< 7.0.0
- linuxcontainers incus: \< 7.0.0
- lxc incus: \< 7.0.0

## References

- <https://github.com/lxc/incus/security/advisories/GHSA-4m88-wxj4-9qj6>
- <https://github.com/lxc/incus/blob/v6.22.0/internal/server/storage/backend.go>
- <https://ubuntu.com/security/CVE-2026-40251>
- <https://www.cve.org/CVERecord?id=CVE-2026-40251>
- <https://github.com/lxc/incus/pull/3273>
- <https://security-tracker.debian.org/tracker/CVE-2026-40251>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40251>
- <https://github.com/lxc/incus>
- <https://security.alpinelinux.org/vuln/CVE-2026-40251>

---

Data as of 2026-12-05T04:20:39.773Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
