Read the docs

ASN.1 DER decoder in libp2p stalls the Node event loop before authentication

Priority HIGH 72CWE-130Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.

Summary

The @libp2p/crypto package in libp2p, a JavaScript networking stack, is affected before 5.1.22. The ASN.1 DER decoder accepts long-form lengths larger than the remaining buffer (CWE-130), so a very small crafted public key can make it loop synchronously over an attacker-claimed length. Because this runs before the Identify timeout can interrupt it, an unauthenticated remote attacker can repeatedly stall the Node event loop and transiently exhaust memory by opening connections.

Written with Claude Haiku 5.5 from the sources below · 2026-11-19

Description from the CNA

libp2p is a JavaScript implementation of the libp2p networking stack. Prior to 5.1.22, the @libp2p/crypto code reached by the default Identify service accepts a remote peer’s crafted publicKey before peer-id or signature verification and passes it through publicKeyFromProtobuf to the ASN.1 DER decoder. readLength in packages/crypto/src/keys/rsa/der.ts accepts long-form element lengths larger than the remaining buffer, causing readInteger and related readers to loop synchronously over an attacker-claimed length from a very small key blob. Because decoding occurs in one event-loop tick before the remotePeer equality check in packages/protocol-identify/src/identify.ts, the Identify timeout cannot interrupt it, allowing repeated unauthenticated connections to stall all timers and peers and transiently exhaust memory. This issue is fixed in version 5.1.22.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00623 51st percentileScored 2026-12-04
Fix Fixed js-libp2p (libp2p): 3.3.8crypto (@libp2p): 5.1.22+1 more product

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
libp2pjs-libp2pbefore 3.3.83.3.8Patch availableCNA
libp2pcryptobefore 5.1.225.1.22Patch availableCNA
—@libp2p/crypto (npm)before 5.1.225.1.22Patch availableGHSA-rvfr-cqwq-rc4j
  • js-libp2p Vendorlibp2p Affected before 3.3.8 Fixed in 3.3.8 Patch available CNA
  • crypto Vendorlibp2p Affected before 5.1.22 Fixed in 5.1.22 Patch available CNA
  • @libp2p/crypto (npm) Vendor— Affected before 5.1.22 Fixed in 5.1.22 Patch available GHSA-rvfr-cqwq-rc4j

Remediation

Upgrade @libp2p/crypto to 5.1.22 and js-libp2p to 3.3.8. The sources list no fixed version for other products.

Written with Claude Haiku 5.5 from the sources below · 2026-11-19

  • Fix · CNA js-libp2p (libp2p) Fixed in 3.3.8
  • Fix · CNA crypto (@libp2p) Fixed in 5.1.22
  • Fix · GHSA-rvfr-cqwq-rc4j @libp2p/crypto (npm) Fixed in 5.1.22 Advisory →

Timeline

  1. 2026-11-17 Threatist record created from CVE-2026-110789
  2. 2026-11-17 Alias added: GHSA-rvfr-cqwq-rc4j
  3. 2026-11-17 Fix available: npm/@libp2p/[email protected] · GHSA-rvfr-cqwq-rc4j
  4. 2026-11-17 CVSS score added · GHSA-rvfr-cqwq-rc4j
  5. 2026-11-17 Weakness changed · GHSA-rvfr-cqwq-rc4j
  6. 2026-11-17 5 new references · GHSA-rvfr-cqwq-rc4j
  7. 2026-11-19 CISA SSVC decision points changed
  8. 2026-11-25 EPSS moved to the below the 50th percentile
  9. 2026-12-01 EPSS moved to the 50th–90th percentile

References

  • TI-2026-60386 libp2p-rendezvous through 0.17.1 Denial of Service via Unbounded Registration TTL in Discovery Responses CVSS 4.0HIGH 8.7
  • TI-2026-58865 libp2p: PeerStore accepts attacker-signed PeerRecords for a victim peer ID and stores certified attacker addresses CVSS 3.1HIGH 8.2
  • TI-2026-44102 libp2p-quic: Remote panic via certificate expiry race during QUIC handshake CVSS 4.0HIGH 8.2
  • TI-2026-27587 libp2p-rust has unbounded rendezvous DISCOVER cookies enable remote memory exhaustion CVSS 3.1HIGH 8.2
  • TI-2026-92657 Unbounded topic subscriptions in libp2p gossipsub exhaust memory CVSS 3.1HIGH 7.5
  • TI-2026-58864 libp2p: Gossipsub StrictSign accepts attacker-signed messages as a victim RSA peer ID CVSS 3.1HIGH 7.5
See all 31 →

Sources