libp2p-rendezvous: Unlimited namespace registrations per peer enables OOM DoS on rendezvous servers
Date: 2026-04
Affected: rust/libp2p-rendezvous
Attack vector: dos
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-35405
CWE: CWE-770
CVSS: 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)

### Summary found that `libp2p-rendezvous` server has no limit on how many namespaces a single peer can register. a malicious peer can just keep registering unique namespaces in a loop and the server happily accepts every single one allocating memory for each registration with no pushback. keep doing this long enough (or with multiple sybil peers) and the server process gets OOM killed. no auth required. any peer on the network can do this. ### Details the bug is in `Registrations::add()` inside `protocols/rendezvous/src/server.rs`. the store uses a BiMap keyed on `(PeerId, Namespace)` so yes, a peer can't register the *same* namespace twice. but there's nothing stopping it from registering 10,000 *different* namespaces. each unique one gets its own entry in: - `registrations_for_peer` (BiMap) - `registrations` (HashMap) - `next_expiry` (FuturesUnordered a new heap-allocated BoxFuture per registration) namespace strings are only validated for length (`MAX_NAMESPACE = 255`), not count. there's no `max_registrations_per_peer` anywhere in `Config` or the rest of the codebase. making it worse `MAX_TTL = 72 hours`. so every registration just sits there for up to 3 days. disconnecting doesn't clean anything up either, entries only go away when the TTL fires. ``` protocols/rendezvous/src/server.rs └── Registrations::add() ← no per-peer count check anywhere protocols/rendezvous/src/lib.rs ├── MAX_NAMESPACE = 255 ← length capped, count is not └── MAX_TTL = 72


Mitigations:

Architectural layers (MAESTRO):