CVE-2026-119793

libp2p: gossipsub creates a permanent topics-map entry per distinct subscription with no cap in the default config

Published Nov 17, 2026 CVSS 3.1 · 7.5 High EPSS n/a KEV · Not listed
Description
libp2p is a JavaScript implementation of the libp2p networking stack. Prior to 17.0.0, the @libp2p/gossipsub default configuration allows a connected remote peer to submit unsigned subscription RPC metadata for arbitrarily many distinct topic strings. handleReceivedSubscription in packages/gossipsub/src/gossipsub.ts creates a persistent topics-map entry for each accepted topic, while allowedTopics is unset by default, decodeRpc maxSubscriptions limits only one RPC rather than aggregate topic bytes, and peer scoring has no subscription-volume penalty. A single peer can therefore grow the topics map and committed heap toward out-of-memory conditions, and disconnecting additionally causes removePeer to scan all accumulated topic entries. This issue is fixed in version 17.0.0.

Analysis

AI-generated

Technical impact

The gossipsub implementation in libp2p creates a permanent topics‑map entry for each subscription request that is accepted. Because the default configuration accepts any number of distinct topic strings and does not impose a maximum, a single malicious peer can submit a large number of unique topics, causing the topics map to grow without bound. This growth consumes committed heap, which can lead to out‑of‑memory conditions and force the node to crash or become unresponsive. The vulnerability does not give the attacker code execution privileges; its primary impact is the denial of service caused by exhausting the peer’s memory resources.

Affected Systems

The affected components are the JavaScript libp2p networking stack, specifically the @libp2p/gossipsub module and the libp2p:js-libp2p package. All versions of these packages released before 17.0.0 are vulnerable. Any application that imports or uses js-libp2p with the default gossipsub configuration is at risk.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity. Exploitation requires that an attacker be able to connect as a peer to the target node, which is typical for P2P networks. Because the vulnerability is purely network‑based and does not rely on user interaction, a remote attacker can trigger it simply by establishing a connection that submits a large number of unique topic strings. EPSS is not available, but the nature of the flaw makes it likely that an attacker could craft a repeated subscription attack. The vulnerability is not listed in the CISA KEV catalog.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade js-libp2p to version 17.0.0 or later, which removes the unbounded topics‑map behavior.
  • If an immediate upgrade is not possible, configure the gossipsub module to restrict allowedTopics or impose a subscription cap to prevent uncontrolled growth.
  • Continuously monitor the node’s memory usage and the number of active topic entries, and disconnect peers that exceed reasonable subscription thresholds.

Generated by OpenCVE AI on November 17, 2026 at 20:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description libp2p is a JavaScript implementation of the libp2p networking stack. Prior to 17.0.0, the @libp2p/gossipsub default configuration allows a connected remote peer to submit unsigned subscription RPC metadata for arbitrarily many distinct topic strings. handleReceivedSubscription in packages/gossipsub/src/gossipsub.ts creates a persistent topics-map entry for each accepted topic, while allowedTopics is unset by default, decodeRpc maxSubscriptions limits only one RPC rather than aggregate topic bytes, and peer scoring has no subscription-volume penalty. A single peer can therefore grow the topics map and committed heap toward out-of-memory conditions, and disconnecting additionally causes removePeer to scan all accumulated topic entries. This issue is fixed in version 17.0.0.
Title libp2p: gossipsub creates a permanent topics-map entry per distinct subscription with no cap in the default config
Weaknesses CWE-400
CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Subscriptions

No data.

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 17, 2026, 7:10 PM
Reserved
Oct 30, 2026, 4:28 PM
Status
Received
Published
Nov 17, 2026, 7:17 PM
Modified
Nov 17, 2026, 7:17 PM