libp2p: gossipsub creates a permanent topics-map entry per distinct subscription with no cap in the default config
- State
- Published
- Severity
- 7.5 High
- Published
- Nov 17, 2026
- Updated
- Nov 18, 2026
- Reserved
- Oct 30, 2026
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.
| Product | Versions |
|---|---|
| js-libp2p libp2p | < 3.3.9 Affected |
| gossipsub @libp2p | < 17.0.0 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 7.5 High | GitHub_M |
Weaknesses
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.