# CVE-2026-49866: libp2p gossipsub denial of service via oversized control messages

Source: https://junglewise.ai/threats/cve-2026-49866-libp2p-gossipsub-denial-of-service-via-oversized-control-messages  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-10  
License: CC BY 4.0 with a link back

CVE-2026-49866 · Severity: high · CVSS 7.5 · Published 2026-07-08

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.

Technologies: [Libp2p Gossipsub](https://junglewise.ai/threats/technologies/gossipsub), [@libp2p/gossipsub (npm)](https://junglewise.ai/threats/technologies/libp2p-gossipsub). Vendors: [Libp2p](https://junglewise.ai/threats/vendors/libp2p), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-49866 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49866 being exploited in the wild.

**How severe is CVE-2026-49866?** High severity, with a CVSS score of 7.5, published 8 July 2026.

**Which products and versions are affected?** Libp2p Gossipsub < 16.0.0; @libp2p/gossipsub (npm) < 16.0.0, SEMVER:introduced=0,fixed=16.0.0.

**Is there a fix for CVE-2026-49866?** Yes. @libp2p/gossipsub (npm): upgrade to 16.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49866 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49866?** Check whether you run Libp2p Gossipsub or @libp2p/gossipsub (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @libp2p/gossipsub (npm): upgrade to 16.0.0 or later

  ```sh
  npm install @libp2p/gossipsub@16.0.0
  ```


## 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

## Identifiers

- CVE-2026-49866
- GHSA-cwc9-cp4j-mcvv

## Timeline

- 2026-06-14: advisory: Initial GitHub Advisory published
- 2026-07-10: patched: Vulnerability updated and patched in version 16.0.0

## References

- [https://api.github.com/users/tahaafarooq](https://api.github.com/users/tahaafarooq)
- [https://github.com/tahaafarooq](https://github.com/tahaafarooq)
- [https://api.github.com/users/tahaafarooq/gists%7B/gist_id%7D](https://api.github.com/users/tahaafarooq/gists%7B/gist_id%7D)
- [https://api.github.com/users/tahaafarooq/repos](https://api.github.com/users/tahaafarooq/repos)
- [https://avatars.githubusercontent.com/u/49201347?v=4](https://avatars.githubusercontent.com/u/49201347?v=4)
- [https://api.github.com/users/tahaafarooq/events%7B/privacy%7D](https://api.github.com/users/tahaafarooq/events%7B/privacy%7D)

## Related threats

- [libp2p Gossipsub message authentication bypass in RSA peer IDs](https://junglewise.ai/threats/cve-2026-86038-libp2p-gossipsub-message-authentication-bypass-in-rsa-peer-ids)
- [libp2p js-libp2p memory exhaustion in @libp2p/gossipsub](https://junglewise.ai/threats/cve-2026-46679-libp2p-js-libp2p-memory-exhaustion-in-libp2p-gossipsub)
