CVE-2026-86040: libp2p: Unbounded RPC decode + synchronous subscription processing in @libp2p/floodsub allows unauthenticated DoS
libp2p is a JavaScript implementation of the libp2p networking stack. Prior to 11.0.26, @libp2p/floodsub accepts unauthenticated RPC frames on /floodsub/1.0.0 through PeerStreams.attachInboundStream in packages/floodsub/src/peer-streams.ts without protobuf element limits, then processRpc and processRpcSubOpt in packages/floodsub/src/floodsub.ts synchronously process the subscriptions array without a per-frame cap. A single bounded-size frame can decode into millions of empty subscription entries that block the event loop, while hundreds of thousands of unique-topic SUBSCRIBE entries allocate PeerSet objects in this.topics that are not removed after peer removal or stop. Empty entries cause CPU exhaustion but do not grow this.topics; persistent memory growth requires unique topics. The subscription path bypasses message signature validation and the message-only processing queue, allowing a remote peer to cause sustained CPU denial of service, memory exhaustion, out-of-memory termination, and node unavailability. The issue is fixed in version 11.0.26.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
@libp2p/floodsubto a version that resolves this vulnerability.Fixed in 11.0.26 - Compensating control
If upgrading is not immediately possible, place a compensating control in front of the peer(s) to limit or block unauthenticated access to the Floodsub RPC path ("/floodsub/1.0.0"), since the vulnerable code path accepts unauthenticated RPC frames without protobuf element limits and processes the subscriptions array synchronously.
- Operational
After upgrading to 11.0.26, monitor the node for any signs of prior CPU exhaustion, memory pressure, or out-of-memory termination, and restart services as needed to recover from any instability.
Event History
Frequently Asked Questions
Which deployments are exposed to remote exploitation?
Any deployment using affected @libp2p/floodsub versions that accepts inbound connections on the /floodsub/1.0.0 protocol is exposed. Exploitation requires only a remote peer; no authentication, privileges, or user interaction are required.
What can an attacker do with empty versus unique-topic subscription entries?
Frames containing millions of empty subscription entries can exhaust CPU by blocking the event loop, but do not increase the topics map. Unique-topic SUBSCRIBE entries create PeerSet objects in this.topics that persist after peer removal or stop, enabling memory exhaustion and potential out-of-memory termination.
Does message signature validation or the normal message queue mitigate this issue?
No. The affected subscription-processing path bypasses message signature validation and the message-only processing queue, and processes subscription arrays synchronously.
What version resolves the issue?
Upgrade @libp2p/floodsub to version 11.0.26 or later.