CVE-2023-40591 — go-ethereum
HIGHCVE-2023-40591 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in github.com/ethereum/go-ethereum. A fix is available for github.com/ethereum/go-ethereum — see the affected versions and patch details below.
Denial of service via malicious p2p message in go-ethereum
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-40591.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/ethereum/go-ethereumReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
A vulnerable node, can be made to consume unbounded amounts of memory when handling specially crafted p2p messages sent from an attacker node.
Details
The p2p handler spawned a new goroutine to respond to ping requests. By flooding a node with ping requests, an unbounded number of goroutines can be created, leading to resource exhaustion and potentially crash due to OOM.
Patches
The fix is included in geth version 1.12.1-stable, i.e, 1.12.2-unstable and onwards.
Fixed by https://github.com/ethereum/go-ethereum/pull/27887
Workarounds
No known workarounds.
Credits
This bug was reported by Patrick McHardy and reported via [email protected].
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/ethereum/go-ethereum | all versions | 1.12.1-stablego get github.com/ethereum/go-ethereum@v1.12.1-stable |
Affected Products
go ethereumethereumDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/ethereum/go-ethereum, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/ethereum/go-ethereum to 1.12.1-stable or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-40591 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is CVE-2023-40591 in your dependencies?
Find it across Go, including transitive dependencies.