CVE-2022-23486 — Vulnerability in libp2p — CVE Details
libp2p DoS vulnerability from lack of resource management
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.86%). Schedule for your next planned update.
Does your project use an affected libp2p version?
Paste your Cargo.lock to check it for CVE-2022-23486 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
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.
Details
In the original version of the attack, the malicious node would continuously open new streams on a single connection using a stream multiplexer that doesn’t provide sufficient back pressure (mplex or yamux). While allocations per stream might be considered small, they multiply with the number of streams and connections. It is easy to defend against this one attack, e.g. by setting a strict per connection stream limit and connection limit. But there are other variations of this attack, e.g. causing memory allocations by sending partial payloads on various protocol levels, forcing the victim to buffer the partial payload for a period of time or by tricking the victim into pre-allocating buffers for messages which are never sent by the attacker.
Patches
Users are advised to upgrade to libp2p v0.45.1 or above.
References
Please see our DoS Mitigation page for more information on how to incorporate mitigation strategies, monitor your application, and respond to attacks: https://docs.libp2p.io/reference/dos-mitigation/.
Please see the related disclosure for go-libp2p: https://github.com/libp2p/go-libp2p/security/advisories/GHSA-j7qp-mfxf-8xjw and js-libp2p: https://github.com/libp2p/js-libp2p/security/advisories/GHSA-f44q-634c-jvwv
For more information
If you have any questions or comments about this advisory, please email us at security@libp2p.io.
Advisory Timeline
- First published December 7, 2022 (1450 days ago).
- Last revised November 8, 2023 — 335 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p libp2p --precise 0.45.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| libp2p crates.io · Affected: All versions | 0.45.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/libp2p/go-libp2p/security/advisories/GHSA-j7qp-mfxf-8xjwWEB
- https://github.com/libp2p/js-libp2p/security/advisories/GHSA-f44q-634c-jvwvWEB
- https://github.com/libp2p/rust-libp2p/security/advisories/GHSA-jvgw-gccv-q5p8WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-23486ADVISORY
- https://github.com/libp2p/rust-libp2pPACKAGE
- https://rustsec.org/advisories/RUSTSEC-2022-0084.htmlWEB
Frequently Asked Questions
- What is CVE-2022-23486?
- libp2p DoS vulnerability from lack of resource management. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2022-23486?
- CVE-2022-23486 affects libp2p. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-23486 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 56.1% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-83817HIGH
CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution