---
id: "CVE-2026-95859"
kind: "vulnerability"
aliases: ["CVE-2026-95859"]
title: "libp2p-rust Gossipsub: unauthenticated peers can exhaust memory via GRAFT"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["gossipsub", "libp2p", "p2p-nodes", "package", "rust"]
not_affected_if: ["no-gossipsub-listener", "not-using-libp2p"]
published_at: "2026-10-16T16:22:44+00:00"
first_seen_at: "2026-10-23T21:57:13+00:00"
updated_at: "2026-10-23T22:39:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-95859", "first_seen_at": "2026-10-23T21:57:13+00:00"}]
---

# libp2p-rust Gossipsub: unauthenticated peers can exhaust memory via GRAFT

libp2p-rust, the Rust implementation of the libp2p networking stack, accepts Gossipsub GRAFT messages for topics a peer never subscribed to, storing each new topic hash per peer. A remote unauthenticated peer can keep sending new topics to grow memory until the process runs out and crashes (denial of service).

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check the libp2p-gossipsub crate version in Cargo.lock; affected if below 0.49.5.

## Fix

Upgrade libp2p-gossipsub (libp2p-rust) to 0.49.5 or later.

## Timeline

- 2026-10-23T21:57:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-95859

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
