CVE-2023-34450
CometBFT PeerState JSON serialization deadlock
Also known as GHSA-mvj3-qrqh-cjvr, GO-2023-1882
Mitigation
- Upgrade github.com/cometbft/cometbft to one of 0.34.29, 0.37.2 (or later in the same release line).
Who should check
- Projects that depend on Go package github.com/cometbft/cometbft (>= 0.34.28, < 0.34.29)
- Anyone running cometbft = 0.34.28; = 0.37.1
Vulnerability facts
- Affected
- github.com/cometbft/cometbft >= 0.34.28, < 0.34.29
- Fixed in
- 0.34.29, 0.37.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 3.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- EPSS
- 0.95% chance of exploitation in 30 days (percentile 60, 2026-11-26)
- CWE
- CWE-401, CWE-770
- Modified
Description
CometBFT is a Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine and replicates it on many machines. An internal modification made in versions 0.34.28 and 0.37.1 to the way struct `PeerState` is serialized to JSON introduced a deadlock when new function MarshallJSON is called. This function can be called from two places. The first is via logs, setting the `consensus` logging module to "debug" level (should not happen in production), and setting the log output format to JSON. The second is via RPC `dump_consensus_state`. Case 1, which should not be hit in production, will eventually hit the deadlock in most goroutines, effectively halting the node. In case 2, only the data structures related to the first peer will be deadlocked, together with the thread(s) dealing with the RPC request(s). This means that only one of the channels of communication to the node's peers will be blocked. Eventually the peer will timeout and excluded from the list (typically after 2 minutes). The goroutines involved in the deadlock will not be garbage collected, but they will not interfere with the system after the peer is excluded. The theoretical worst case for case 2, is a network with only two validator nodes. In this case, each of the nodes only has one `PeerState` struct. If `dump_consensus_state` is called in either node (or both), the chain will halt until the peer connections time out, after which the nodes will reconnect (with different `PeerState` structs) and the chain will progress again. Then, the same process can be repeated. As the number of nodes in a network increases, and thus, the number of peer struct each node maintains, the possibility of reproducing the perturbation visible with two nodes decreases. Only the first `PeerState` struct will deadlock, and not the others (RPC `dump_consensus_state` accesses them in a for loop, so the deadlock at the first iteration causes the rest of the iterations of that "for" loop to never be reached). This regression was fixed in versions 0.34.29 and 0.37.2. Some workarounds are available. For case 1 (hitting the deadlock via logs), either don't set the log output to "json", leave at "plain", or don't set the consensus logging module to "debug", leave it at "info" or higher. For case 2 (hitting the deadlock via RPC `dump_consensus_state`), do not expose `dump_consensus_state` RPC endpoint to the public internet (e.g., via rules in one's nginx setup).
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/cometbft/cometbft | >= 0.34.28, < 0.34.29 | 0.34.29, 0.37.2 | osv |
| cometbft | = 0.34.28; = 0.37.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-34450. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-34450.md Affected: github.com/cometbft/cometbft >= 0.34.28, < 0.34.29 Fixed in: 0.34.29, 0.37.2 Steps: 1. Search this machine and project for github.com/cometbft/cometbft (Go), cometbft: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2023-34450 being exploited?
There is no confirmed exploitation: CVE-2023-34450 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.95% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-34450?
Low: CVSS 3.7 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-34450?
github.com/cometbft/cometbft >= 0.34.28, < 0.34.29.
Is there a fix for CVE-2023-34450?
Yes. Fixed in 0.34.29, 0.37.2. Upgrade github.com/cometbft/cometbft to one of 0.34.29, 0.37.2 (or later in the same release line).
How do I check if I'm affected by CVE-2023-34450?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.