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

High 7.5 Published Updated

Attackers can cause CPU exhaustion and block the Node.js event loop by sending oversized gossipsub control messages, requiring an upgrade to libp2p.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-49866?

CVE-2026-49866 is a high-severity denial of service vulnerability in js-libp2p, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-770

Which versions are affected by CVE-2026-49866?

2 open source packages ship an affected version, including @libp2p/gossipsub.

PackageAffectedFixed in
@libp2p/gossipsub npmAll versions16.0.0
@libp2p/gossipsub npmAll versions16.0.0

How do I fix CVE-2026-49866?

Upgrade @libp2p/gossipsub to 16.0.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-49866 being exploited?

There is no known exploitation of CVE-2026-49866 in the wild and no public exploit code.

Sources

Also known as GHSA-cwc9-cp4j-mcvv.

Is CVE-2026-49866 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free