Improper Validation of Array Index Affecting incus package, versions <6.0.4-2+deb13u7


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.41% (33rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-INCUS-18496053
  • published1 Aug 2026
  • disclosed6 May 2026

Introduced: 6 May 2026

CVE-2026-40251  (opens in a new tab)
CWE-129  (opens in a new tab)

How to fix?

Upgrade Echo:latest incus to version 6.0.4-2+deb13u7 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream incus package and not the incus package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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) &gt;= 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.

CVSS Base Scores

version 3.1