nimiq-block contains block primitives to be used in Nimiq's Rust implementation. `SkipBlockProof::verify` computes its quorum check using `BitSet.len()`, then iterates `BitSet` indices and casts each `usize` index to `u16` (`slot as u16`) for slot lookup. Prior to version 1.3.0, if an attacker can get a `SkipBlockProof` verified where `MultiSignature.signers` contains out-of-range indices spaced by 65536, these indices inflate `len()` but collide onto the same in-range `u16` slot during aggregation. This makes it possible for a malicious validator with far fewer than `2f+1` real signer slots to pass skip block proof verification by multiplying a single BLS signature by the same factor. The patch for this vulnerability is included as part of v1.3.0. No known workarounds are available.
The `SkipBlockProof::verify` function calculates quorum based on `BitSet.len()`, then iterates over `BitSet` indices, casting each index from `usize` type to `u16` type when looking up a slot. If the `MultiSignature.signers` field contains indices outside the range spaced by multiples of 65536, these indices inflate the `len()` result (counted on full `usize` values), but during aggregation they collide to the same `u16` slot within range. As a result, a single BLS signature can be counted multiple times as different votes, allowing the `2f+1` threshold to be met without actually possessing the required number of signing slots. This is a combination of improper input validation (CWE-20), integer overflow during type casting (CWE-190), lack of data authenticity verification (CWE-345), and improper index quantity validation (CWE-1284).
A malicious validator can pass skip block proof verification while possessing significantly fewer actual slots than the required quorum threshold, enabling compromise of network consensus integrity and potential disruption of network operation.
The nimiq-block library should be updated to version 1.3.0 or newer, which contains a fix eliminating the described vulnerability. The vendor indicates no known workarounds.
The nimiq-block library used in the Nimiq Proof-Of-Stake implementation in Rust (core-rs-albatross) — versions before 1.3.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:HNimiq Proof Of Stake
APPNimiq< 1.3.0
Related vulnerabilities
nimiq-primitives contains primitives (e.g., block, account, transaction) to be used in Nimiq's Rust implementa...
Nimiq's network-libp2p is a Nimiq network implementation based on libp2p. Prior to version 1.3.0, `network-lib...
nimiq/core-rs-albatross is a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross c...
nimiq-blockchain provides persistent block storage for Nimiq's Rust implementation. In 1.3.0 and earlier, bloc...
nimiq/core-rs-albatross is a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross c...