Vulnerabilities/

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

Severity:
High

Description

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.

Recommendation

Update the @libp2p/gossipsub package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
@libp2p/gossipsub
Anything's wrong? Let us know Last updated on May 21, 2026