Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @libp2p/gossipsub
  4. ›
  5. CVE-2026-46679

CVE-2026-46679: js-libp2p: Memory DoS via subscription flood of unique topics

May 21, 2026 (updated June 11, 2026)

Three cooperating omissions in @libp2p/gossipsub allow an unauthenticated single peer to exhaust the Node.js heap of any gossipsub node with default options.

  1. defaultDecodeRpcLimits.maxSubscriptions = Infinity (packages/gossipsub/src/message/decodeRpc.ts:11): no decode-level cap on subscription entries per RPC.
  2. handleReceivedSubscription is unbounded (gossipsub.ts:1009-1021): every unique topic string creates a new Map entry + Set object in this.topics with no per-peer count limit.
  3. removePeer leaves empty Sets (gossipsub.ts:782-784): after peer disconnect, empty Sets are never deleted from this.topics thus memory is non-reclaimable within the process lifetime.

A single 4MB LP frame carries 349,525 unique topic SUBSCRIBE entries. Each frame causes ~89MB of heap growth (~22x amplification). A Node.js process with a 1.5GB heap limit crashes after ~17 such frames (~68MB total attacker bandwidth, achievable in ~5 seconds at 100Mbps).

References

  • github.com/advisories/GHSA-4f8r-922h-2vgv
  • github.com/libp2p/js-libp2p/security/advisories/GHSA-4f8r-922h-2vgv
  • nvd.nist.gov/vuln/detail/CVE-2026-46679

Code Behaviors & Features

Detect and mitigate CVE-2026-46679 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 15.0.23

Fixed versions

  • 15.0.23

Solution

Upgrade to version 15.0.23 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-400: Uncontrolled Resource Consumption
  • CWE-401: Missing Release of Memory after Effective Lifetime

Source file

npm/@libp2p/gossipsub/CVE-2026-46679.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:04 +0000.