ASN.1 DER decoder in libp2p stalls the Node event loop before authentication
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
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
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
- 2026-11-17 Threatist record created from CVE-2026-110789
- 2026-11-17 Alias added: GHSA-rvfr-cqwq-rc4j
- 2026-11-17 Fix available: npm/@libp2p/[email protected] · GHSA-rvfr-cqwq-rc4j
- 2026-11-17 CVSS score added · GHSA-rvfr-cqwq-rc4j
- 2026-11-17 Weakness changed · GHSA-rvfr-cqwq-rc4j
- 2026-11-17 5 new references · GHSA-rvfr-cqwq-rc4j
- 2026-11-19 CISA SSVC decision points changed
- 2026-11-25 EPSS moved to the below the 50th percentile
- 2026-12-01 EPSS moved to the 50th–90th percentile
References
Other 5
- https://github.com/libp2p/js-libp2p/security/advisories/GHSA-rvfr-cqwq-rc4j
- https://github.com/libp2p/js-libp2p/pull/3587
- https://github.com/libp2p/js-libp2p/commit/ef6e1851cb00511a4793a5e68948e0cdad385332
- https://github.com/libp2p/js-libp2p/releases/tag/crypto-v5.1.22
- https://github.com/libp2p/js-libp2p
More libp2p vulnerabilities
- 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
Sources
- CVE-2026-110789 · CVE Program
- CVE-2026-110789 · NVD
- FIRST EPSS
- GHSA-rvfr-cqwq-rc4j · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences