# CVE-2026-54542: Nimiq nimiq-primitives out-of-bounds panic in KeyNibbles::Add

Source: https://junglewise.ai/threats/cve-2026-54542-nimiq-nimiq-primitives-out-of-bounds-panic-in-keynibbles-add  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-07-16  
License: CC BY 4.0 with a link back

CVE-2026-54542 · Severity: low · CVSS 3.7 · Published 2026-09-14

A vulnerability in the Nimiq blockchain software allows a malicious network peer to crash a node during the synchronization process. By sending a specially crafted data chunk, an attacker can trigger an internal error that causes the syncing node to stop functioning. While the crash is temporary and the node will attempt to restart, it can disrupt operations and delay the synchronization of the blockchain state.

Technologies: [nimiq-primitives (crates.io)](https://junglewise.ai/threats/technologies/nimiq-primitives), [Nimiq Core-Rs-Albatross](https://junglewise.ai/threats/technologies/core-rs-albatross). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io), [Nimiq](https://junglewise.ai/threats/vendors/nimiq).

## Quick answers

**Is CVE-2026-54542 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54542 being exploited in the wild.

**How severe is CVE-2026-54542?** Low severity, with a CVSS score of 3.7, published 14 September 2026.

**Which products and versions are affected?** nimiq-primitives (crates.io) < 1.6.0, SEMVER:introduced=0,fixed=1.6.0; Nimiq Core-Rs-Albatross <= 1.5.1.

**Is there a fix for CVE-2026-54542?** Yes. nimiq-primitives (crates.io): upgrade to 1.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54542 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-54542?** Check whether you run nimiq-primitives (crates.io) or Nimiq Core-Rs-Albatross at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nimiq-primitives (crates.io): upgrade to 1.6.0 or later

  ```sh
  cargo update -p nimiq-primitives
  ```


## Technical details

An out-of-bounds read/panic exists in the `KeyNibbles::Add` function within `primitives/src/key_nibbles.rs`. The root cause is a lack of combined-length validation when concatenating a parent key with a child suffix from a `TrieChunk` proof, which can exceed the fixed 63-byte backing array. An attacker acting as a state-sync source can exploit this by providing a crafted proof; the panic occurs during deserialization before proof verification, meaning no valid cryptographic proof is required. The attack requires the victim to be in the state-sync phase and connected to the attacker's peer. The issue is fixed in version 1.6.0 by adding length checks during concatenation.

## Affected products

- Nimiq nimiq-primitives <= 1.5.1
- Nimiq core-rs-albatross <= 1.5.1

## Identifiers

- CVE-2026-54542
- GHSA-5rg2-xv9j-gv5p

## Timeline

- 2026-06-05: disclosed
- 2026-07-16: advisory
- 2026-07-16: patched

## References

- [https://api.github.com/users/paberr](https://api.github.com/users/paberr)
- [https://github.com/paberr](https://github.com/paberr)
- [https://api.github.com/users/paberr/gists%7B/gist_id%7D](https://api.github.com/users/paberr/gists%7B/gist_id%7D)
- [https://api.github.com/users/paberr/repos](https://api.github.com/users/paberr/repos)
- [https://avatars.githubusercontent.com/u/13586855?v=4](https://avatars.githubusercontent.com/u/13586855?v=4)
- [https://api.github.com/users/paberr/events%7B/privacy%7D](https://api.github.com/users/paberr/events%7B/privacy%7D)

## Related threats

- [Nimiq nimiq-primitives panic in TrieProof::verify](https://junglewise.ai/threats/cve-2026-54541-nimiq-nimiq-primitives-panic-in-trieproof-verify)
- [Nimiq Albatross denial of service in MerkleRadixTrie synchronization](https://junglewise.ai/threats/cve-2026-46545-nimiq-albatross-denial-of-service-in-merkleradixtrie)
- [Nimiq core-rs-albatross DoS in Ed25519 multisig delinearization](https://junglewise.ai/threats/cve-2026-46542-nimiq-core-rs-albatross-dos-in-ed25519-multisig-delinearization)
- [Nimiq BlockInclusionProof cryptographic bypass in nimiq-primitives](https://junglewise.ai/threats/cve-2026-46539-nimiq-blockinclusionproof-cryptographic-bypass-in-nimiq)
- [nimiq-primitives: Node crash due to missing interlink validation in election macro block proposals](https://junglewise.ai/threats/cve-2026-34065-nimiq-primitives-node-crash-due-to-missing-interlink-validation)
