CVE-2026-35457
JSON

8.2high

libp2p-rust has unbounded rendezvous DISCOVER cookies enable remote memory exhaustion

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.26% (higher than 18% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v5hw-cv9c-rpg7RUSTSEC-2026-0527

Description

libp2p-rust is the official rust language Implementation of the libp2p networking stack. Prior to 0.17.1, the rendezvous server stores pagination cookies without bounds. An unauthenticated peer can repeatedly issue DISCOVER requests and force unbounded memory growth. This vulnerability is fixed in 0.17.1.

Affected

Product or packageVersionsReported by
libp2p rust-libp2p< 0.17.1CVE List
libp2p-rendezvous (crates.io)before 0.17.1, from 0.0.0-0 before 0.17.1GitHub Advisory Database, RustSec Advisory Database
protocol libp2pbefore 0.17.1NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
RustSec Advisory Database8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Classification

CWE-770

SSVC (CISA-ADP): exploitation poc, automatable yes, 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.17.1, the rendezvous server stores pagination cookies without bounds. An unauthenticated peer can repeatedly issue DISCOVER requests and force unbounded memory growth. This vulnerability is fixed in 0.17.1.

GitHub Advisory Database
Summary

The rendezvous server stores pagination cookies without bounds. An unauthenticated peer can repeatedly issue DISCOVER requests and force unbounded memory growth.

Details

Pagination state is stored in:

HashMap<Cookie, HashSet<RegistrationId>>

On Message::Discover:

remote peer
→ DISCOVER
→ handle_request
→ registrations.get(...)
→ new cookie generated
→ cookie inserted into Registrations::cookies

There is no upper bound or eviction policy, so repeated DISCOVER requests grow this map indefinitely.

PoC

A reproduction test and minimal harness will be provided in a private fork in a follow-up comment.

Impact

Remote state amplification leading to memory exhaustion.

Properties:

  • etwork reachable
  • no authentication required
  • low attack complexity
  • protocol-compliant traffic

Impacts rendezvous nodes exposed to untrusted peers.

Possible Fixes
  1. Global cap + eviction

Bound cookie storage (MAX_COOKIES_TRACKED) with FIFO/expiry aware eviction.
Tradeoff: attacker can churn cookies and evict legitimate pagination state.

  1. Stateless cookies

Encode pagination state in authenticated cookies instead of storing server-side state.
Tradeoff: more complex implementation.

  1. Rate limiting / per-peer quotas

Limit cookie creation per peer.
Tradeoff: requires peer tracking.

RustSec Advisory Database

Each DISCOVER request to a rendezvous server creates a pagination cookie, which the server kept in a map together with the registrations already returned for it. Entries were never evicted or capped, so an unauthenticated peer sending ordinary DISCOVER requests can make the server's memory grow without bound.

The fix keeps cookies in a fixed-size LRU cache (10,000 entries by default, configurable through Config). It is in 0.17.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-35457 changed 2026-04-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-v5hw-cv9c-rpg7 changed 2026-11-13CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0527 changed 2026-11-13CC0-1.0
NVDCVE-2026-35457 changed 2026-06-17Public domain