Description
@libp2p/gossipsub through 17.2.3 contains an uncontrolled resource consumption vulnerability that allows remote peers to grow the metrics registry by sending messages with arbitrary topics when metrics are enabled. Attackers can send messages with unbounded distinct topic strings, creating never-removed labelled time series before validation, to exhaust Node.js process memory.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| libp2p | @libp2p/gossipsub | 0 ≤17.2.3 | — |
References
- https://github.com/libp2p/js-libp2p/blob/gossipsub-v17.2.3/packages/gossipsub/src/metrics.ts#L709-L711
- https://github.com/libp2p/js-libp2p/blob/gossipsub-v17.2.3/packages/gossipsub/src/metrics.ts#L875-L878
- https://github.com/libp2p/js-libp2p/blob/gossipsub-v17.2.3/packages/gossipsub/src/gossipsub.ts#L1103-L1108
- https://www.vulncheck.com/advisories/libp2p-gossipsub-through-17.2.3-memory-exhaustion-via-unbounded-metric-label-cardinality