Security Vulnerability Report
中文
CVE-2026-33184 CVSS 7.5 HIGH

CVE-2026-33184

Published: 2026-04-03 23:17:04
Last Modified: 2026-05-05 18:17:14

Description

nimiq/core-rs-albatross is a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross consensus algorithm. Prior to version 1.3.0, the discovery handler accepts a peer-controlled limit during handshake and stores it unchanged. The immediate HandshakeAck path then honors limit = 0 and returns zero contacts, which makes the session look benign. Later, after the same session reaches Established, the periodic update path computes self.peer_list_limit.unwrap() as usize - 1. With limit = 0, that wraps to usize::MAX and then in rand 0.9.2, choose_multiple() immediately attempts Vec::with_capacity(amount), which deterministically panics with capacity overflow. This issue has been patched in version 1.3.0.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:* - VULNERABLE
nimiq/core-rs-albatross < 1.3.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// This is a conceptual Proof of Concept demonstrating the vulnerability trigger. // It simulates the vulnerable logic in nimiq/core-rs-albatross prior to v1.3.0. fn trigger_vulnerability(peer_limit: usize) { // Simulating the state where the session is Established // and the periodic update path is running. // The vulnerable code path calculates the amount for vector allocation // based on the peer-controlled limit. // Vulnerability: `peer_limit - 1` where peer_limit = 0 causes underflow. let amount = peer_limit - 1; println!("Allocating vector with capacity: {}", amount); // This mimics the call chain inside rand 0.9.2 choose_multiple() // Vec::with_capacity will panic if the calculation overflows/is too large. let _vec: Vec<u8> = Vec::with_capacity(amount); println!("Allocation successful (should not reach here if limit was 0)"); } fn main() { // Attack scenario: Peer sends limit = 0 during handshake let malicious_limit = 0; println!("Triggering vulnerability with limit = {}", malicious_limit); trigger_vulnerability(malicious_limit); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33184", "sourceIdentifier": "[email protected]", "published": "2026-04-03T23:17:03.600", "lastModified": "2026-05-05T18:17:13.890", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "nimiq/core-rs-albatross is a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross consensus algorithm. Prior to version 1.3.0, the discovery handler accepts a peer-controlled limit during handshake and stores it unchanged. The immediate HandshakeAck path then honors limit = 0 and returns zero contacts, which makes the session look benign. Later, after the same session reaches Established, the periodic update path computes self.peer_list_limit.unwrap() as usize - 1. With limit = 0, that wraps to usize::MAX and then in rand 0.9.2, choose_multiple() immediately attempts Vec::with_capacity(amount), which deterministically panics with capacity overflow. This issue has been patched in version 1.3.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-191"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:*", "versionEndIncluding": "1.2.2", "matchCriteriaId": "F1D1AFE5-536A-424A-B7D3-AFCE79533E39"}]}]}], "references": [{"url": "https://github.com/nimiq/core-rs-albatross/commit/8f60a2d75b74b55764ecf34bd4435f4961630595", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/nimiq/core-rs-albatross/pull/3664", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/nimiq/core-rs-albatross/releases/tag/v1.3.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/nimiq/core-rs-albatross/security/advisories/GHSA-5rm9-893q-vmhm", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}