Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. nimiq-primitives
  4. ›
  5. CVE-2026-54542

CVE-2026-54542: nimiq-primitives: Out-of-bounds panic in KeyNibbles::Add from oversized child suffix in a deserialized proof

July 16, 2026

A malicious peer acting as a state-sync source can crash a syncing node with a crafted TrieChunk whose proof contains a TrieNodeChild whose suffix, when concatenated with the parent key via KeyNibbles::Add, exceeds the fixed 63-byte backing array. Add (primitives/src/key_nibbles.rs:332 / :341) indexes bytes[self.bytes_len()..self.bytes_len() + other.bytes_len()] with no combined-length check, causing an out-of-bounds slice panic (both the even- and odd-length branches).

KeyNibbles deserialization validates only the individual length <= 126, not the combined parent + suffix length. The panic occurs at put_chunk → child.key() → is_stump() → +, i.e. before proof.verify(), so no valid proof is required. As with the related child_index issue, exploitation requires being the victim’s sync peer during state sync, and the resulting crash is transient (the node restarts and re-syncs).

Affected: core-rs-albatross <= 1.5.1 (nimiq-primitives).

References

  • github.com/advisories/GHSA-5rg2-xv9j-gv5p
  • github.com/nimiq/core-rs-albatross/commit/eabfc3e21731b0628c3f933163a0f1e1864217bf
  • github.com/nimiq/core-rs-albatross/pull/3790
  • github.com/nimiq/core-rs-albatross/releases/tag/v1.6.0
  • github.com/nimiq/core-rs-albatross/security/advisories/GHSA-5rg2-xv9j-gv5p
  • nvd.nist.gov/vuln/detail/CVE-2026-54542

Code Behaviors & Features

Detect and mitigate CVE-2026-54542 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.0

Fixed versions

  • 1.6.0

Solution

Upgrade to version 1.6.0 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

cargo/nimiq-primitives/CVE-2026-54542.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:21 +0000.