Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › JavaScript

CVE-2026-110789 — libp2p: ASN.1 DER decoder drives an unbounded synchronous loop on attacker-controlled length fields, stalling the Node event loop pre-auth

High · CVSS 7.5EPSS 0.6% First seen November 17, 2026
JavaScriptWebCloud & containersCrypto & walletsVulnerabilities

Research article

libp2p ASN.1 DER Decoder Vulnerability in js-libp2p

CVECVE-2026-110789
Vendor and productnpm:@libp2p/crypto; libp2p js-libp2p; @libp2p crypto
PublishedNovember 19, 2026 10:05 UTC
Research cut-offNovember 19, 2026 09:51 UTC
Sources reviewed4: NVD record (last modified 2026-11-19); CISA KEV catalog; GitHub advisory (2026-11-17); FIRST EPSS (2026-11-18)

Executive summary

CVE-2026-110789 affects the libp2p js-libp2p and @libp2p/crypto libraries, allowing an unauthenticated attacker to stall the Node event loop by sending a crafted Identify message. The CVSS 3.1 score is 7.5 HIGH, scored by GitHub [3]. The vulnerability impacts versions less than 3.3.8 and 5.1.22, respectively [1]. The reviewed sources do not report exploitation [2]. The main action is to upgrade @libp2p/crypto to 5.1.22 [3]; the pack does not list a fixed version for js-libp2p.

Key points

  • CVE-2026-110789 affects the libp2p js-libp2p and @libp2p/crypto libraries [1].
  • A maliciously crafted Identify message can cause the Node event loop to stall for 4 to 5 seconds per connection [3].
  • The vulnerability is rated CVSS 3.1 7.5 HIGH, scored by GitHub [3].
  • The reviewed sources do not report exploitation [2].
  • The fixed version for @libp2p/crypto is 5.1.22 [3].

Vulnerability identification

CVE IDVendorProductCWECVSS 3.1PublishedLast ModifiedRecord Status
CVE-2026-110789libp2pjs-libp2pCWE-130, CWE-4007.5 HIGH, scored by security-advisories@github.com (Secondary)2026-11-17T20:17:352026-11-19T04:17:24Received
CVE-2026-110789libp2p@libp2p/cryptoCWE-130, CWE-4007.5 HIGH, scored by GitHub2026-11-17T21:05:082026-11-17T21:05:09Advisory updated (GHSA-rvfr-cqwq-rc4j)

Vulnerability description

A maliciously crafted Identify message containing a specially formatted publicKey field can cause the Node event loop to stall for approximately 4 to 5 seconds per connection [3]. The issue arises when the library parses DER long-form lengths without verifying the buffer size, leading to unbounded synchronous iteration and excessive memory allocation [3].

Attack surface and exploitation prerequisites

The CVSS vector indicates the attack requires network access (AV:N), no privileges (PR:N), and no user interaction (UI:N) [1]. The vulnerability can be exploited before authentication is completed, allowing repeated attacks via reconnections [3].

Impact analysis

The CVSS vector indicates no impact on confidentiality (C:N) and integrity (I:N), but a high impact on availability (A:H) [1]. The attack causes the event loop to stall, freezing timers, heartbeats, and protocol timeouts [3]. In memory-constrained environments, the attack can lead to an out-of-memory (OOM) error [3].

Affected products and versions

Affected ProductAffected VersionFixed Version
libp2p js-libp2p< 3.3.8Not listed
@libp2p/crypto< 5.1.225.1.22 [3]

Exploitation and threat intelligence status

CVE-2026-110789 is not listed in the CISA KEV catalog as of 2026-11-19 [2]. The EPSS score for this vulnerability is 0.63%, indicating a low probability of exploitation in the next 30 days [4].

Detection and exposure assessment

Readers can determine exposure by checking if their installed version of libp2p js-libp2p is less than 3.3.8 or @libp2p/crypto is less than 5.1.22 [1]. A proof of concept demonstrates the stall and memory usage, which can be used for detection [3].

Remediation

The fixed version for @libp2p/crypto is 5.1.22 [3]. The advisory recommends clamping or asserting the end or finalOffset against the buffer length before iteration in readInteger() and related functions [3]. A DER-element-length sanity cap should also be added at the decodeDer entry point [3].

Remediation checklist

  1. The pack does not list a fixed version for libp2p js-libp2p; the affected versions are listed as less than 3.3.8 [1].
  2. Upgrade @libp2p/crypto to version 5.1.22, the fixed version listed [3].
  3. Implement a DER-element-length sanity cap at the `decodeDer` entry point [3].
  4. Clamp or assert the `end` or `finalOffset` against the buffer length before iteration in `readInteger()` and related functions [3].

Evidence gaps

  • The sources do not describe the affected component's internals.
  • The sources do not mention a workaround.
  • The sources do not provide a complete version range for all affected products.
  • The sources do not describe the attack lifecycle in detail.
  • The sources do not provide indicators of compromise.

References

  1. CVE-2026-110789 record. NIST National Vulnerability Database (NVD), 2026-11-19. https://nvd.nist.gov/vuln/detail/CVE-2026-110789. Accessed 2026-11-19. Vulnerability identification, Affected products and versions, Detection and exposure assessment
  2. Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-19. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-19. Exploitation and threat intelligence status
  3. GHSA-rvfr-cqwq-rc4j / CVE-2026-110789 — libp2p: ASN.1 DER decoder drives an unbounded synchronous loop on attacker-controlled length fields, stalling the Node event loop pre-auth. GitHub Security Advisory Database, 2026-11-17. https://github.com/advisories/GHSA-rvfr-cqwq-rc4j. Accessed 2026-11-19. Vulnerability description, Attack surface and exploitation prerequisites, Impact analysis, Remediation
  4. EPSS score for CVE-2026-110789. FIRST, 2026-11-18. https://api.first.org/data/v1/epss?cve=CVE-2026-110789. Accessed 2026-11-19. Exploitation and threat intelligence status

Written with AI assistance from the 4 sources listed above, as of the research cut-off; each fact is cited to its source. Check the vendor's advisory before acting.

Severity breakdown

High · 7.5 CVSS 3.1 base score from the CNA (github.com)

An attacker without an account can exploit this over the network, without any user action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
no
Scope
stays within the vulnerable component
Impact
high on availability, none on confidentiality and integrity

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness

  • CWE-130: Improper Handling of Length Parameter Inconsistency
  • CWE-400: Uncontrolled Resource Consumption

Affected and fixed versions

ProductAffected versionsFixed in
@libp2p/crypto (npm)≤ 5.1.215.1.22
libp2p js-libp2p< 3.3.8—
@libp2p crypto< 5.1.22—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

Summary

A remote peer can stall a js-libp2p node's entire event loop for ~4–5 seconds per connection (and transiently allocate ~2 GB) by sending a ~15-byte crafted publicKey inside an Identify message. The malformed key reaches the DER decoder before any peer-id/signature check, so the attack is pre-auth and repeatable indefinitely by reconnecting.

Details

packages/crypto/src/keys/rsa/der.ts readLength() parses DER long-form lengths with no comparison to buf.byteLength, and readInteger() then loops over the attacker-claimed length:

function readInteger (buf, context) {
  const length = readLength(buf, context)   // attacker-controlled, claims up to 2^64
  const end = context.offset + length
  for (let i = context.offset; i < end; i++) // runs far past buf.byteLength
    vals.push(buf[i])                         // pushes `undefined` past the end
}

The blob reaches the parser pre-auth: Identify runs on every connection:open and calls publicKeyFromProtobuf(publicKey) (packages/protocol-identify/src/identify.ts:85) before the connection.remotePeer.equals(id) check at identify.ts:88. The MAX_RSA_JWK_SIZE guard in pkixToRSAPublicKey only bounds the total blob size, not the inner length field, so a 15-byte payload defeats it; the ECDSA path (unmarshalECDSAPublicKey) has no cap at all. The decode runs in a single synchronous tick, so no AbortSignal — including Identify's 5 s timeout — can interrupt it. Verified on js-libp2p commit a04f5e0, where @libp2p/crypto reads 5.1.21.

PoC

Full PoC attached (libp2p-crypto-der-eventloop-dos-poc.tar.gz). Build the js-libp2p monorepo at the affected version (npm install --ignore-scripts && npm run build), extract the package inside the monorepo root (sibling of packages/), then cd libp2p-crypto-der-eventloop-dos-poc && node attack.mjs. Expected:

[*] round 1: payload sent=true, victim event-loop stall = 4s, peak RSS ~1980 MB
[*] round 2: payload sent=true, victim event-loop stall = 4-5s, peak RSS ~1980 MB
[*] round 3: payload sent=true, victim event-loop stall = 4s, peak RSS ~1980 MB
[!] Vulnerability reproduced: 3/3 connections each stalled the victim's event loop for ~4-5s — one crafted ~15-byte Identify publicKey per connection, pre-auth

The stall is measured from the victim's own 1 s heartbeat clock (frozen while the loop is blocked); the ~2 GB transient RSS peak is read from /proc/<pid>/status. The DER RangeError is swallowed by Identify's .catch(() => {}), so the node survives and every new connection re-stalls it; under a container memory limit the ~2 GB spike OOM-kills the process. A node attack.mjs control run (legitimate Identify) shows 0 s stalls.

Impact

CWE-130/CWE-400. Any node running the default Identify service is affected. A single peer can keep the node unresponsive to all of its peers (every new connection adds another multi-second stall — all timers, heartbeats, and protocol timeouts stop) and, in memory-constrained deployments, force an OOM kill. Suggested fix: in readLength, reject any long-form length whose value exceeds buf.byteLength - context.offset; in readInteger/readObjectIdentifier/readBitString/readOctetString, clamp or assert end/finalOffset against buf.byteLength before looping; add an overall DER-element-length sanity cap at decodeDer entry and a byte-length cap in unmarshalECDSAPublicKey.

libp2p-crypto-der-eventloop-dos-poc.tar.gz

Source: GHSA-rvfr-cqwq-rc4j / CVE-2026-110789, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • npm:@libp2p/crypto
  • libp2p js-libp2p
  • @libp2p crypto

Frequently asked questions

What is CVE-2026-110789?

CVE-2026-110789 affects the libp2p js-libp2p and @libp2p/crypto libraries, allowing an unauthenticated attacker to stall the Node event loop by sending a crafted Identify message. The CVSS 3.1 score is 7.5 HIGH, scored by GitHub. The vulnerability impacts versions less than 3.3.8 and 5.1.22, respectively. The reviewed sources do not report exploitation. Weakness type: Improper Handling of Length Parameter Inconsistency (CWE-130).

How severe is CVE-2026-110789?

CVE-2026-110789 has a CVSS 3.1 base score of 7.5 (high), from the CNA (github.com). An attacker without an account can exploit this over the network, without any user action.

Is CVE-2026-110789 being exploited?

Not as far as is known: CVE-2026-110789 is not in CISA's Known Exploited Vulnerabilities catalog as of November 28, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-110789?

@libp2p/crypto (npm) ≤ 5.1.21 (fixed in 5.1.22); libp2p js-libp2p < 3.3.8; @libp2p crypto < 5.1.22.

How do I fix CVE-2026-110789?

The pack does not list a fixed version for libp2p js-libp2p; the affected versions are listed as less than 3.3.8. Upgrade @libp2p/crypto to version 5.1.22, the fixed version listed. Implement a DER-element-length sanity cap at the decodeDer entry point.

Timeline & sources

References

Related vulnerabilities & news