CVE-2026-95859
JSON

8.7high

libp2p-rust: Gossipsub GRAFT topics unbounded growth

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.29% (higher than 23% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
RUSTSEC-2026-0536GHSA-g3g5-x568-qvqx

Description

libp2p-rust is the official Rust language implementation of the libp2p networking stack. Prior to 0.49.5, Gossipsub GRAFT control-message handling unconditionally adds attacker-supplied topic hashes to connected_peer.topics without confirming that the peer previously subscribed to those topics. A remote unauthenticated peer that can reach a Gossipsub listener can repeatedly send novel GRAFT topics, causing cumulative per-peer memory growth that is not bounded by subscription filters, peer scoring, or per-message size limits. This can exhaust process memory and cause a denial of service. This issue is fixed in version 0.49.5.

Affected

Product or packageVersionsReported by
libp2p rust-libp2p< 0.49.5CVE List
libp2p-gossipsub (crates.io)from 0.0.0-0 before 0.49.5RustSec Advisory Database

Classification

CWE-770

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

libp2p-rust is the official Rust language implementation of the libp2p networking stack. Prior to 0.49.5, Gossipsub GRAFT control-message handling unconditionally adds attacker-supplied topic hashes to connected_peer.topics without confirming that the peer previously subscribed to those topics. A remote unauthenticated peer that can reach a Gossipsub listener can repeatedly send novel GRAFT topics, causing cumulative per-peer memory growth that is not bounded by subscription filters, peer scoring, or per-message size limits. This can exhaust process memory and cause a denial of service. This issue is fixed in version 0.49.5.

RustSec Advisory Database

When a GRAFT control message arrived, every topic it named was added to that peer's set of topics, on the assumption that a peer grafting us must be subscribed. Nothing checked that the peer had subscribed, and subscription filters only apply to SUBSCRIBE messages. A peer can keep sending GRAFTs with new short topic IDs over one connection, and the set grows until the peer unsubscribes or disconnects. Memory grows without bound and the node can be killed for running out of memory.

The fix no longer records topics from GRAFT messages and drops a GRAFT for a topic the peer has not subscribed to. It also makes MaxCountSubscriptionFilter the default subscription filter. It is in 0.49.5, and was backported to the 0.50 line before 0.50.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-95859 changed 2026-10-21CVE Terms of Use
RustSec Advisory DatabaseRUSTSEC-2026-0536 changed 2026-11-13CC0-1.0
NVDCVE-2026-95859 changed 2026-10-21Public domain