{"answers":{"affected":"5 open source packages ship an affected version, including github.com/cometbft/cometbft. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-34450 in the wild and no public exploit code.","fix":"Upgrade github.com/cometbft/cometbft to a fixed version for your release line: 0.34.29 or 0.37.2.","what":"CVE-2023-34450 is a low-severity denial of service vulnerability in cometbft, published on 3 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-34450 and fix it if it is affected.\n\nWhat it is: CVE-2023-34450 is a low-severity denial of service vulnerability in cometbft, published on 3 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-34450 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/cometbft/cometbft (Go): affected from 0.34.28; fixed in 0.34.29\n- github.com/cometbft/cometbft (Go): affected from 0.34.28; fixed in 0.34.29\n- github.com/cometbft/cometbft (Go): affected from 0.37.1; fixed in 0.37.2\n- github.com/cometbft/cometbft (Go): affected from 0.37.1; fixed in 0.37.2\n- github.com/cometbft/cometbft (Go): affected from 0.37.1; fixed in 0.37.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-34450/ (Markdown: https://insights.sbomify.com/CVE-2023-34450/index.md)","id":"CVE-2023-34450","markdown":"https://insights.sbomify.com/CVE-2023-34450/index.md","name":"CVE-2023-34450","record":{"aliases":["GHSA-mvj3-qrqh-cjvr","GO-2023-1882"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"BFT consensus middleware","requires_auth":"none","summary":"A deadlock in CometBFT's JSON serialization can halt nodes or block peer communication, requiring debug logging or RPC access to trigger.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"cometbft","vendor":"cometbft"}],"cvss":{"score":3.7,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"},{"id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"}],"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`.\n\nCase 1, which should not be hit in production, will eventually hit the deadlock in most goroutines, effectively halting the node.\n\nIn 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.\n\nThe 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.\n\nAs 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).\n\nThis 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).","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"CometBFT PeerState JSON serialization deadlock","id":"CVE-2023-34450","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2023"},"n_packages":5,"n_references":4,"next":{"headline":"CometBFT may duplicate transactions in the mempool's data structures","id":"CVE-2023-34451"},"packages":[{"ecosystem":"Go","fixed":["0.34.29"],"introduced":["0.34.28"],"last_affected":[],"package":"github.com/cometbft/cometbft","purl":null,"source":"GHSA-mvj3-qrqh-cjvr"},{"ecosystem":"Go","fixed":["0.34.29"],"introduced":["0.34.28"],"last_affected":[],"package":"github.com/cometbft/cometbft","purl":"pkg:golang/github.com/cometbft/cometbft","source":"GHSA-mvj3-qrqh-cjvr"},{"ecosystem":"Go","fixed":["0.37.2"],"introduced":["0.37.1"],"last_affected":[],"package":"github.com/cometbft/cometbft","purl":null,"source":"GHSA-mvj3-qrqh-cjvr"},{"ecosystem":"Go","fixed":["0.37.2"],"introduced":["0.37.1"],"last_affected":[],"package":"github.com/cometbft/cometbft","purl":"pkg:golang/github.com/cometbft/cometbft","source":"GHSA-mvj3-qrqh-cjvr"},{"ecosystem":"Go","fixed":["0.37.2"],"introduced":["0.37.1"],"last_affected":[],"package":"github.com/cometbft/cometbft","purl":"pkg:golang/github.com/cometbft/cometbft","source":"GO-2023-1882"}],"prev":{"headline":"ink! vulnerable to incorrect decoding of storage value when using `DelegateCall`","id":"CVE-2023-34449"},"products":["cometbft"],"published":"2023-07-03","related":[{"cvss_score":8.2,"headline":"CometBFT may duplicate transactions in the mempool's data structures","id":"CVE-2023-34451","kev_date_added":null,"published":"2023-07-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-29","vendors":["cometbft"]},"summary":"A deadlock in CometBFT's JSON serialization can halt nodes or block peer communication, requiring debug logging or RPC access to trigger.","url":"https://insights.sbomify.com/CVE-2023-34450/"}