{"id":"CVE-2023-40583","aliases":["CVE-2023-40583","GHSA-gcq9-qqwx-rgj3","GO-2023-2024"],"related":[],"kind":"vulnerability","state":"published","title":"libp2p nodes vulnerable to OOM attack","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nIn 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.\n\nIt is feasible to do this at scale. An attacker would have to transfer ~1/2 as much memory it wants to occupy (2x amplification factor).\n\nThe attacker can perform this attack over time as the target node’s memory will not be garbage collected.\n\nThis can occur because when a signed peer record is received, only the signature validity check is performed but the sender signature is not checked. Signed peer records from randomly generated peers can be sent by a malicious actor. A target node will accept the peer record as long as the signature is valid, and then stored in the peer store.\n\nThere is cleanup logic in the peer store that cleans up data when a peer disconnects, but this cleanup is never triggered for the fake peer (from which signed peer records were accepted) because it was never “connected”.\n\n### Impact\nIf 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.)\n\n### Patches\nUpdate your go-libp2p dependency to the latest release, v0.30.0 at the time of writing.\n\nIf you'd like to stay on the 0.27.x release, we strongly recommend users to update to go-libp2p [0.27.7](https://github.com/libp2p/go-libp2p/releases/tag/v0.27.7). Though this OOM issue was fixed in 0.27.4, there were subsequent patch releases afterwards (important fixes for other issues unrelated to the OOM).\n\n### Workarounds\nNone","format":"markdown","source":"ghsa"},{"lang":"en","text":"A malicious actor can store an arbitrary amount of data in the memory of a remote node by sending the node a message with a signed peer record. Signed peer records from randomly generated peers can be sent by a malicious actor. This memory does not get garbage collected and so the remote node can run out of memory (OOM).","format":"markdown","source":"go"},{"lang":"es","text":"libp2p es una pila de red y una biblioteca modularizada a partir del Proyecto IPFS, y empaquetada por separado para que otras herramientas puedan utilizarla. En go-libp2p, mediante el uso de registros de pares firmados, un actor malicioso puede almacenar una cantidad arbitraria de datos en la memoria de un nodo remoto. Esta memoria no se recoge de la basura, por lo que la víctima puede quedarse sin memoria y bloquearse. Si los usuarios de go-libp2p en producción no monitorizan el consumo de memoria a lo largo del tiempo, podría tratarse de un ataque silencioso, es decir, el atacante podría hacer caer nodos durante un periodo de tiempo (el tiempo depende de los recursos del nodo, es decir, un nodo go-libp2p en un servidor virtual con 4 gb de memoria tarda unos 90 segundos en caerse; en un servidor más grande, podría tardar un poco más). Este problema fue corregido en la versión 0.27.4.","source":"nvd"}],"published":"2023-08-24T22:22:59.000Z","modified":"2026-06-17T06:18:34.563Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"< 0.27.4","status":"affected"}],"vendor":"libp2p","product":"go-libp2p","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.27.4"}],"ecosystem":"Go","package":"github.com/libp2p/go-libp2p","purl":"pkg:golang/github.com/libp2p/go-libp2p","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.27.4"}],"ecosystem":"Go","package":"github.com/libp2p/go-libp2p","purl":"pkg:golang/github.com/libp2p/go-libp2p","source":"go"},{"ranges":[{"status":"affected","fixed":"0.27.4"}],"vendor":"protocol","product":"libp2p","cpe":"cpe:2.3:a:protocol:libp2p:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/libp2p/go-libp2p/security/advisories/GHSA-gcq9-qqwx-rgj3","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/libp2p/go-libp2p/commit/45d3c6fff662ddd6938982e7e9309ad5fa2ad8dd","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/libp2p/go-libp2p/releases/tag/v0.27.4","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/libp2p/go-libp2p/releases/tag/v0.27.7","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-40583","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/libp2p/go-libp2p","tags":["package"],"sources":["ghsa"]}],"credits":["Marten Seemann"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-10-02T14:44:58.191Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-40583","url":"https://www.cve.org/CVERecord?id=CVE-2023-40583","licence":"CVE Terms of Use","modified":"2024-10-02T14:45:16.702Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gcq9-qqwx-rgj3","url":"https://github.com/advisories/GHSA-gcq9-qqwx-rgj3","licence":"CC-BY-4.0","modified":"2023-11-17T22:07:30.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-2024","url":"https://pkg.go.dev/vuln/GO-2023-2024","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-40583","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-40583","licence":"Public domain","modified":"2026-06-17T06:18:34.563Z"}],"updatedAt":"2026-11-25T22:58:27.369Z","epss":{"score":0.00952,"percentile":0.62342,"date":"2026-12-01T12:00:22.000Z"}}