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

CVE-2026-54541: nimiq-primitives: Panic in TrieProof::verify via child_index unwrap on equal-length keys

July 16, 2026

A malicious peer acting as a state-sync source can crash a syncing node by sending a crafted TrieChunk whose proof contains two TrieProofNodes with identical keys. TrieProof::verify() calls TrieProofNode::child_index() (primitives/src/trie/trie_proof_node.rs:94), which unconditionally unwraps KeyNibbles::get(self.key.len()). Because is_prefix_of returns true for two equal keys, execution reaches get(len), which returns None, and the unwrap() panics.

The panic is reached from untrusted network input (ResponseChunk → commit_chunks → put_chunk → proof.verify()) before any cryptographic proof verification, so the attacker does not need to produce a valid proof. Exploitation requires the attacker to be selected as the victim’s sync peer while the victim is performing 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-46wq-28cx-mhw4
  • github.com/nimiq/core-rs-albatross/commit/41d35acee1b5cf3bc34ec3ddc1abbc03604e791e
  • github.com/nimiq/core-rs-albatross/pull/3789
  • github.com/nimiq/core-rs-albatross/releases/tag/v1.6.0
  • github.com/nimiq/core-rs-albatross/security/advisories/GHSA-46wq-28cx-mhw4
  • nvd.nist.gov/vuln/detail/CVE-2026-54541

Code Behaviors & Features

Detect and mitigate CVE-2026-54541 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-248: Uncaught Exception

Source file

cargo/nimiq-primitives/CVE-2026-54541.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:20 +0000.