libp2p: Denial of service in @libp2p/crypto (CVE-2026-110789)
An unauthenticated remote denial-of-service vulnerability exists in @libp2p/crypto due to improper ASN.1 DER decoding of crafted public keys processed by the Identify service.
CVE search metadata
CVE search record: CVE-2026-110789. Severity: high. CVSS: 7.5. KEV: no. Product: @libp2p/crypto, js-libp2p. Brief: libp2p: Denial of service in @libp2p/crypto (CVE-2026-110789). Brief link: https://feed.craftedsignal.io/briefs/2026-11-libp2p-denial-of-service-cve-2026-110789/
Triage facts
Revision 1- Applicability
- @libp2p/crypto, js-libp2p
- Evidence
- Unknown
- Severity
- Low
- Action
- Elevated
- Sources
- 2 public sources
- Freshness
- Revision 1Nov 17, 22:52 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- A1
Overview
A vulnerability exists in @libp2p/crypto prior to version 5.1.22. The Identify service processes remote public keys using the ASN.1 DER decoder before performing peer-id or signature verification. An attacker can submit a crafted key containing a long-form element length that exceeds the buffer size, forcing the decoder into a synchronous loop that exhausts system resources. Because this decoding occurs within a single event-loop tick, it bypasses standard Identify service timeouts, potentially leading to persistent memory exhaustion and peer stalling.
Attack Chain
- Attacker establishes an unauthenticated connection to a peer running an affected version of libp2p.
- Attacker initiates the Identify service protocol exchange.
- Attacker sends a crafted public key blob designed to trigger the ASN.1 DER decoding logic.
- The library executes
publicKeyFromProtobufand passes the data to the vulnerablereadLengthfunction inpackages/crypto/src/keys/rsa/der.ts. - The decoder enters a synchronous loop due to an attacker-supplied length field that exceeds the actual data buffer.
- The event-loop is blocked, preventing the
remotePeerequality check inpackages/protocol-identify/src/identify.tsfrom executing. - Multiple such requests result in resource exhaustion and service unavailability.
Impact
Successful exploitation allows an unauthenticated remote attacker to cause a denial-of-service condition by stalling timers, peers, and inducing transient memory exhaustion.
Recommendation
Update @libp2p/crypto to version 5.1.22 or later immediately.
Threat Hunt
Identify Node.js process instances experiencing prolonged Event Loop blockages or rapid memory growth spikes associated with incoming libp2p Identify service connections.
Data: Node.js process metrics (event loop lag/latency), Application memory usage logs, libp2p Identify service connection logs
Mitigations
Update @libp2p/crypto to version 5.1.22 or later.
Gaps
- No specific network-layer detection exists for the ASN.1 DER parsing logic; prioritize patching over detection.