/

CVE-2026-33471

Severity:

CRITICAL RISK

(9.6)

Quorum / Signature Verification Bypass in Nimiq Skip Block

CVE-2026-33471

Analyzed

Vulnerability type

Category:

Quorum / Signature Verification Bypass

CWE:

CWE-20, CWE-190, CWE-345, CWE-1284

Impact:

Consensus Integrity Compromise / Forged Quorum Proofs

Severity:

CRITICAL RISK

(9.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A quorum verification flaw in Nimiq's Rust block primitives allows malicious validators to bypass SkipBlockProof::verify by abusing integer truncation and inadequate input validation on signer indices.

By crafting MultiSignature.signers entries with out-of-range indices that collide when cast from usize to u16, an attacker can make a small set of real signatures appear to meet the required 2f+1 quorum threshold and have an invalid skip block proof accepted.

Affected context

This vulnerability affects systems using the nimiq-block Rust crate for consensus-related operations, specifically where SkipBlockProof::verify is relied upon to validate BLS multi-signature-based skip block proofs.

The issue manifests when MultiSignature.signers is treated as a trusted set of signer indices and these indices are used both to compute quorum size via BitSet.len() and to index into slot tables after being cast down to u16. Deployments are at risk when untrusted or semi-trusted parties can propose or relay skip block proofs that are then verified by honest nodes.

Exploit preconditions

  • Attack surface: Consensus / block validation layer, specifically skip block proof verification using SkipBlockProof::verify.
  • Required access: Ability to submit or influence skip block proofs (e.g., as a validator or protocol participant capable of proposing or relaying blocks/proofs).
  • Trigger point: Verification of a crafted SkipBlockProof whose MultiSignature.signers bitset includes carefully chosen out-of-range indices.
  • Why exploitation is possible:
  • The quorum count is derived from BitSet.len(), which reflects the number of set bits, including those at large indices.
  • The same indices are later cast from usize to u16 (slot as u16) for slot lookup.
  • Indices separated by multiples of 65536 (2^16) map to the same u16 value, causing multiple logically distinct signer slots to collide onto the same real slot.
  • A malicious validator can inflate the apparent number of signers while actually controlling far fewer real slots, then multiply a single valid BLS signature to match the inflated count.

Why this happens

The core problem is a combination of insufficient input validation (CWE-20) and integer handling errors (CWE-190) in security-critical quorum calculations.

At a high level:

  • The code treats the MultiSignature.signers bitset as if all set bits correspond to valid, in-range validator slots without enforcing a strict upper bound.
  • It computes quorum membership using BitSet.len(), a metric that can be inflated by placing bits at arbitrarily large indices.
  • It later truncates those indices from usize to u16 for slot lookup, assuming the reduction is safe. This introduces index collisions where indices differing by multiples of 65536 resolve to the same u16 slot.

This behavior maps to:

  • CWE-20: Improper Input Validation: the signer indices are not validated against the expected slot range before being used to compute quorum.
  • CWE-190: Integer Overflow or Wraparound: casting from a wider integer type to a narrower one discards high-order bits, effectively causing wraparound / truncation.
  • CWE-345: Insufficient Verification of Data Authenticity: the multi-signature and corresponding signer set are not tightly bound in a way that prevents index manipulation and multiplicity tricks.
  • CWE-1284: Improper Validation of Integrity Check Value: the aggregate signature and signer set are accepted as a valid integrity proof without robust checks that each counted signer corresponds to a unique, valid validator slot.

Conceptually, the bug is: "Quorum and aggregation logic trusts an attacker-controlled set of indices, then silently truncates those indices when mapping them onto a smaller domain," which is an insecure pattern in any consensus, voting, or multi-signature system.

Potential impact

  • A malicious validator can cause skip block proofs to be accepted with far fewer than the required 2f+1 real signatures.
  • Consensus nodes may accept blocks or skip blocks that do not actually meet the intended quorum, undermining fault tolerance assumptions.
  • Adversaries could accelerate or manipulate chain progression by forging apparent agreement, potentially enabling:
  • Chain reordering or censorship scenarios.
  • Safety violations where conflicting histories are both considered valid by different nodes.
  • Reduced resiliency against collusion or partial validator compromise, as fewer keys are needed to simulate a full quorum.

General mitigation guidance

Effective mitigation focuses on correctly binding signer identities to indices and eliminating unsafe integer truncation in verification logic.

Useful defensive patterns include:

  • Strong range validation on indices:
  • Treat all signer indices as untrusted input.
  • Enforce that every index falls within the valid validator slot range before counting it toward quorum or using it for lookups.
  • Consistent integer types for indices:
  • Use a single, explicit type for validator indices across the codebase (e.g., a domain-specific ValidatorIndex newtype) to avoid accidental narrowing conversions.
  • Avoid casts from wider to narrower integer types in consensus-critical code; if necessary, use checked conversions that fail on out-of-range values.
  • Deduplication and uniqueness checks:
  • Ensure each counted signer corresponds to a unique, valid slot.
  • Reject proofs where multiple indices map to the same logical validator due to truncation or encoding quirks.
  • Tight binding between signatures and signer sets:
  • Architect the multi-signature scheme so that the aggregate signature, signer list/bitset, and validator set are cryptographically and structurally linked, leaving no room for index manipulation.
  • Defensive coding patterns in consensus logic:
  • Treat consensus verification as a high-assurance boundary with explicit assertions and invariants (e.g., "no out-of-range indices", "no duplicate signers").
  • Favor clear, auditable logic over micro-optimizations in these paths.

How teams detect issues like this

Detection should focus on identifying unsafe index handling and trust of attacker-controlled indices in consensus or cryptographic verification code.

Potential strategies:

  • Static analysis and linting:
  • Flag casts from wider integer types (e.g., usize) to narrower ones (e.g., u16) in security-critical modules.
  • Detect unchecked conversions such as as casts in Rust where TryFrom or checked_* variants should be used.
  • Highlight uses of bitsets or collections where element indices come from untrusted data and are not range-checked before use.
  • Targeted code review practices:
  • Review all implementations of quorum checks, multi-signature aggregation, and consensus verification for:
  • Assumptions about index ranges and uniqueness.
  • Silent truncation, wraparound, or overflow behavior.
  • Reliance on collection lengths (len(), bit counts) that can be manipulated by adversaries.
  • Property- and fuzz-based testing:
  • Use fuzzers to generate signer bitsets with large, sparse, or malformed indices and verify that the implementation never:
  • Counts out-of-range indices toward quorum.
  • Accepts proofs where multiple indices collide onto the same logical validator.
  • Add invariants to tests, such as "accepted proof ⇒ each counted signer is within range and unique".
  • Automated review tools:
  • Integrate Rust-specific security linters and custom Clippy lints into CI to flag unsafe integer casts and missing range checks.
  • Use formal verification or model checking for critical consensus components where feasible.

Sources

SourceLink
github.comgithub.com/nimiq/core-rs-albatross/commit/d02059053181ed8ddad6b59a0adfd661ef5cd823
github.comgithub.com/nimiq/core-rs-albatross/releases/tag/v1.3.0
github.comgithub.com/nimiq/core-rs-albatross/security/advisories/GHSA-6973-8887-87ff

Frequently asked

questions

Exploitation requires the ability to influence or submit SkipBlockProof structures that are accepted by honest nodes. In practice, this typically means an attacker must participate in the consensus protocol (e.g., as a validator or equivalent actor) or compromise a component that constructs proofs. It is not a generic remote code execution issue, but it can meaningfully affect consensus safety.

The attacker must be able to craft and present skip block proofs with arbitrary MultiSignature.signers bitsets that are then processed by SkipBlockProof::verify. This usually implies protocol-level access rather than end-user access; for example, being a validator, controlling a node implementation, or interfering with the network path that supplies proofs.

The safest pattern is to enforce strict validation and consistency checks on all signer indices and associated metadata before they influence quorum calculations. This includes:

  • Rejecting any index outside the expected validator set range.
  • Using checked integer conversions instead of lossy casts.
  • Ensuring each counted signer is uniquely mapped to a valid validator slot.

Combined, these measures prevent index manipulation and make later verification logic simpler and more trustworthy.

Prevention involves adopting secure design and coding practices for consensus-critical paths:

  • Model indices and identifiers with dedicated types and explicit bounds.
  • Treat all externally supplied indices, bitsets, and signer lists as hostile until proven valid.
  • Avoid silent integer truncation; use explicit, checked conversions and handle failures.
  • Subject consensus algorithms and multi-signature schemes to focused security reviews, fuzzing, and (where possible) formal analysis to catch subtle edge cases like index collisions and quorum inflation.
Find out what's already
exploitable in your codebase.