CVE-2022-23486 libp2p-rust denial of service vulnerability from lack of resource management

High 7.5 Published Updated

An attacker can exhaust memory resources in libp2p nodes, causing a denial of service by forcing the process to crash.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-23486?

CVE-2022-23486 is a high-severity denial of service vulnerability in rust-libp2p, published on 7 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

libp2p-rust is the official rust language Implementation of the libp2p networking stack. In versions prior to 0.45.1 an attacker node can cause a victim node to allocate a large number of small memory chunks, which can ultimately lead to the victim’s process running out of memory and thus getting killed by its operating system. When executed continuously, this can lead to a denial of service attack, especially relevant on a larger scale when run against more than one node of a libp2p based network. Users are advised to upgrade to `libp2p` `v0.45.1` or above. Users unable to upgrade should reference the DoS Mitigation page for more information on how to incorporate mitigation strategies, monitor their application, and respond to attacks: https://docs.libp2p.io/reference/dos-mitigation/.

Weakness: CWE-770, CWE-400

Which versions are affected by CVE-2022-23486?

3 open source packages ship an affected version, including libp2p. It affects 1 product.

PackageAffectedFixed in
libp2p crates.ioAll versions0.45.1
libp2p crates.ioAll versions0.45.1
libp2p crates.ioFrom 0.0.0-00.45.1

Products include Protocol Libp2p.

How do I fix CVE-2022-23486?

Upgrade libp2p to 0.45.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-23486 being exploited?

There is no known exploitation of CVE-2022-23486 in the wild and no public exploit code.

Sources

Also known as GHSA-jvgw-gccv-q5p8, RUSTSEC-2022-0084.

Is CVE-2022-23486 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free