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

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-04T19:16:25.000Z
- Modified: 2026-10-26T19:10:00.163Z
- Also known as: GHSA-4m88-wxj4-9qj6, GO-2026-5127
- Weaknesses: CWE-125, CWE-129
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- lxc incus: < 7.0.0
- github.com/lxc/incus/v6/cmd/incusd (Go): before 7.0.0
- github.com/lxc/incus (Go): all versions
- github.com/lxc/incus/v6 (Go): all versions
- github.com/lxc/incus/v7 (Go): before 7.0.0
- linuxcontainers incus: before 7.0.0

## Every score

- GitHub_M: CVSS:4.0 7.1 High `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`
- GitHub: CVSS:3.1 6.5 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/lxc/incus/security/advisories/GHSA-4m88-wxj4-9qj6> (exploit, advisory, vendor-advisory, web)
- <https://github.com/lxc/incus/blob/v6.22.0/internal/server/storage/backend.go> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40251> (advisory)
- <https://github.com/lxc/incus> (package)

## Sources

- CVE List: [CVE-2026-40251](https://www.cve.org/CVERecord?id=CVE-2026-40251), CVE Terms of Use, modified 2026-05-07
- GitHub Advisory Database: [GHSA-4m88-wxj4-9qj6](https://github.com/advisories/GHSA-4m88-wxj4-9qj6), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5127](https://pkg.go.dev/vuln/GO-2026-5127), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40251](https://nvd.nist.gov/vuln/detail/CVE-2026-40251), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40251 · Whole record: https://cve.day/CVE-2026-40251.json · Rebuilt by cve.day 2026-11-25T22:59:20.835Z
