Skip to main content
Vulnerability Database/CVE-2026-54542

CVE-2026-54542: Nimiq Rust Implementation DOS Vulnerability

CVE-2026-54542 is a denial of service flaw in Nimiq Rust implementation that allows malicious peers to crash syncing nodes during state synchronization. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-54542 Overview

CVE-2026-54542 affects Nimiq core-rs-albatross, a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross consensus algorithm. Versions prior to 1.6.0 contain an out-of-bounds read [CWE-125] in the trie key handling logic. A malicious state-sync peer can crash a syncing node by sending a crafted TrieChunk whose proof contains a TrieNodeChild suffix that, when combined with the parent key, exceeds the 63-byte KeyNibbles backing array. The resulting panic aborts the node process. The issue is fixed in version 1.6.0.

Critical Impact

Remote attackers positioned as a state-sync peer can trigger a transient denial-of-service by crashing syncing nodes without needing a valid cryptographic proof.

Affected Products

  • Nimiq core-rs-albatross versions prior to 1.6.0
  • Nodes performing state synchronization using the Albatross consensus implementation
  • Deployments exposing the peer-to-peer sync interface to untrusted network peers

Discovery Timeline

  • 2026-09-14 - CVE-2026-54542 published to NVD
  • 2026-09-14 - Last updated in NVD database

Technical Details for CVE-2026-54542

Vulnerability Analysis

The flaw resides in KeyNibbles::Add within primitives/src/key_nibbles.rs. The addition operator concatenates two KeyNibbles values using a combined slice operation without validating that the resulting length fits inside the fixed-size backing array. KeyNibbles uses a 63-byte inline buffer, so any concatenation whose total nibble length exceeds MAX_BYTES * 2 triggers an out-of-bounds access.

Attacker-supplied data reaches this path through put_chunk, TrieNodeChild::key, and TrieNodeChild::is_stump before proof.verify is executed. Because the panic occurs prior to proof verification, the attacker does not need a cryptographically valid proof to reach the vulnerable code. Exploitation is transient: the node process aborts, restarts, and attempts to resynchronize.

Root Cause

The root cause is a missing bounds check at a trust boundary. KeyNibbles::Add assumed the operands would always fit within the backing array, but one operand originates from a deserialized TrieNodeChild suffix supplied by a remote peer. Concatenating a valid parent key with an attacker-controlled suffix can push the total length past MAX_BYTES * 2, producing an out-of-bounds panic in the underlying slice operation.

Attack Vector

Exploitation requires the attacker to be selected as the victim node's state-sync peer. Once selected, the attacker sends a TrieChunk containing a TrieNodeChild whose suffix is individually valid but whose combined length with the parent key exceeds the 63-byte capacity. The victim processes the chunk, invokes the vulnerable concatenation, and panics before any proof verification runs.

rust
// Patch: primitives/src/key_nibbles.rs
// Introduces a checked concatenation at trust boundaries.
(false, false) => self.cmp(other),
    }
}

/// Concatenates two keys, returning `None` if the combined nibble length would exceed
/// the storage capacity (`MAX_BYTES * 2`). Use this at trust boundaries where one of
/// the operands is deserialized from an untrusted source.
pub fn checked_add(&self, other: &KeyNibbles) -> Option<KeyNibbles> {
    if self.len() + other.len() > Self::MAX_BYTES * 2 {
        return None;
    }
    Some(self + other)
}

Source: GitHub Commit eabfc3e

rust
// Patch: primitives/src/trie/trie_node.rs
// Replaces unchecked concatenation with checked_add in is_stump.
parent_key: &KeyNibbles,
missing_range: &Option<RangeFrom<KeyNibbles>>,
) -> bool {
    let Some(combined) = parent_key.checked_add(&self.suffix) else {
        return false;
    };
    missing_range
        .as_ref()
        .map(|range| range.contains(&combined))
        .unwrap_or(false)
}

Source: GitHub Commit eabfc3e

Detection Methods for CVE-2026-54542

Indicators of Compromise

  • Node process crashes with an out-of-bounds panic originating from KeyNibbles or primitives/src/key_nibbles.rs in stack traces.
  • Repeated node restarts and state-sync retries following connections from a specific peer.
  • Sync sessions that terminate abruptly during put_chunk processing before proof verification logs are emitted.

Detection Strategies

  • Parse Nimiq node logs for panic messages referencing KeyNibbles, TrieNodeChild, or put_chunk.
  • Correlate crash events with the peer ID that supplied the preceding TrieChunk to identify malicious sync peers.
  • Monitor for anomalous restart loops on validator or full nodes performing state sync.

Monitoring Recommendations

  • Track node uptime and restart frequency on all Nimiq deployments to surface transient DoS activity.
  • Alert on repeated state-sync failures from the same remote peer identifier.
  • Ingest process crash telemetry and Nimiq application logs into a centralized log platform for correlation.

How to Mitigate CVE-2026-54542

Immediate Actions Required

  • Upgrade all Nimiq core-rs-albatross deployments to version 1.6.0 or later.
  • Restart affected nodes after upgrade and verify that state sync completes without panics.
  • Review peer connection logs to identify prior interactions with untrusted sync peers.

Patch Information

The fix is included in Nimiq core-rs-albatross v1.6.0. It introduces KeyNibbles::checked_add, which returns None when the combined nibble length would exceed MAX_BYTES * 2, and applies the checked variant at trust boundaries in TrieNodeChild::key and TrieNodeChild::is_stump. See Pull Request #3790 and GHSA-5rg2-xv9j-gv5p for full advisory details.

Workarounds

  • Restrict state-sync peering to a trusted allowlist of known-good nodes until the patch is applied.
  • Deploy process supervision that logs and rate-limits automatic restarts to surface exploitation attempts.
  • Isolate exposed nodes behind network controls that limit which remote peers can initiate state sync.
bash
# Upgrade to the patched release
git clone https://github.com/nimiq/core-rs-albatross.git
cd core-rs-albatross
git checkout v1.6.0
cargo build --release

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.