Nimiq Node Panic due to Invalid BLS Key
An unauthenticated peer can crash a Nimiq node by sending a malformed election macro block containing an invalid BLS voting key, leading to a denial of service.
A critical vulnerability exists in Nimiq’s core-rs-albatross library, specifically within the nimiq-primitives crate, affecting versions 0.2.0 and earlier. An attacker can exploit this vulnerability by sending a malicious election macro block to a Nimiq node. This block contains an invalid compressed BLS voting key. When the node attempts to process this block, specifically during the hashing of the election macro header and the validation of the validators set via Validators::voting_keys(), the validator.voting_key.uncompress().unwrap() function is triggered. Due to the invalid BLS key, this operation results in a panic, effectively crashing the Nimiq node and causing a denial-of-service condition. The vulnerability was patched in version 1.3.0 of the core-rs-albatross library.
Attack Chain
- Attacker identifies a vulnerable Nimiq node running a version of
nimiq-primitivesless than or equal to 0.2.0. - Attacker crafts a malicious election macro block.
- The malicious block contains an invalid compressed BLS voting key within the
validatorsset. - The attacker sends the crafted block to the target Nimiq node via the peer-to-peer network.
- The Nimiq node receives the block and begins processing it.
- During the hashing of the election macro header, the
validatorsset is processed. - The
Validators::voting_keys()function is called, which attempts to uncompress the BLS voting key. - Due to the invalid compressed BLS key, the
validator.voting_key.uncompress().unwrap()function panics, causing the node to crash and leading to a denial of service.
Impact
Successful exploitation of this vulnerability leads to a denial-of-service condition for the targeted Nimiq node. This can disrupt network operations, prevent legitimate transactions from being processed, and potentially impact the overall stability of the Nimiq network. The vulnerability allows any untrusted peer to trigger the crash.
Recommendation
- Upgrade to version 1.3.0 or later of the
core-rs-albatrosslibrary to patch CVE-2026-34065. - Implement rate limiting on incoming peer connections to mitigate the impact of malicious blocks being sent to the node.
Detection coverage 2
Detect Nimiq Node Panic - Invalid BLS Key Attempt
highDetects attempts to crash Nimiq nodes by sending election macro blocks with invalid BLS keys. This rule triggers when a node logs an error related to BLS key uncompression failure, indicating a potential DoS attack.
Detect Nimiq Node Panic - Election Macro Block Processing Error
mediumDetects errors during the processing of election macro blocks in Nimiq nodes. This could indicate a variety of issues, including invalid data that may trigger panics.
Detection queries are kept inside the platform. Get full rules →