Executive brief
A vulnerability in the libp2p gossipsub library, used by blockchain and peer-to-peer applications like Ethereum clients and IPFS, allows an attacker to crash or freeze a node. By sending specially crafted network messages with an excessive number of identifiers, an attacker can overwhelm the system's processor. This results in a denial-of-service where the affected node can no longer process transactions, participate in the network, or respond to legitimate users.
Technical details
The vulnerability exists in the gossipsub implementation of js-libp2p where IHAVE and IWANT control messages are processed synchronously without a decode-time cap on the number of message IDs. The default configuration sets limits like maxIhaveMessageIDs and maxIwantMessageIDs to Infinity. An attacker can send a 4MB RPC frame containing approximately 180,000 message IDs; the victim iterates through every ID before applying any truncation or rate limits. For IWANT messages, there is no per-peer rate limit, allowing a single connection to maintain high CPU utilization indefinitely. For IHAVE messages, an attacker can use approximately 10 Sybil peers to achieve a total event-loop stall. The issue is resolved in version 16.0.0 by introducing finite default limits for RPC decoding.
Affected products
- libp2p @libp2p/gossipsub < 16.0.0
Timeline
- 2026-06-14: advisory: Initial GitHub Advisory published
- 2026-07-10: patched: Vulnerability updated and patched in version 16.0.0