CVE-2025-24371: Github.com/cometbft/cometbft CometBFT Allows A Malicious Peer Vulnerability
MODERATECVE-2025-24371 is a MODERATE cometbft allows a malicious peer vulnerability (CWE-703: Improper Check or Handling of Exceptional Conditions) affecting Github.com/cometbft/cometbft libraries in the Go ecosystem. The issue involves cometbft allows a malicious peer to make node stuck in blocksync. Remediation is available by upgrading affected packages to version 1.0.1, 0.38.17.
CVE-2025-24371 at a Glance
How to Fix CVE-2025-24371
To remediate this vulnerability, upgrade all affected Github.com/cometbft/cometbft dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cometbft/cometbft to 1.0.1
Upgrade github.com/cometbft/cometbft to 0.38.17
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cometbft/cometbft
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-24371, inspect your project dependencies for Github.com/cometbft/cometbft:
inspect dependencies for github.com/cometbft/cometbft
Analyze the terminal output to locate any version of Github.com/cometbft/cometbft in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-703: Improper Check or Handling of Exceptional Conditions, where the product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product. In Github.com/cometbft/cometbft, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-24371 Affected Github.com/cometbft/cometbft Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cometbft/cometbft
|
Go |
≥ 1.0.0-alpha.1
< 1.0.1
|
1.0.1
|
|
github.com/cometbft/cometbft
|
Go |
< 0.38.17
|
0.38.17
|
References
Frequently Asked Questions
What is CVE-2025-24371?
Which Github.com/cometbft/cometbft versions are affected?
What version fixes CVE-2025-24371?
Is github.com/cometbft/cometbft affected?
What CWE is associated with CVE-2025-24371?
How can I check Go dependencies for CVE-2025-24371?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-22qq-3xwm-r5x4",
"modified" : "2026-03-09T20:46:44Z",
"published" : "2025-02-03T15:55:28Z",
"aliases" : [ "CVE-2025-24371" ],
"summary" : "CometBFT allows a malicious peer to make node stuck in blocksync",
"details" : "Name: ASA-2025-001: Malicious peer can disrupt node's ability to sync via blocksync\nComponent: CometBFT\n[OUTDATED] Criticality: Medium (Considerable Impact; Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))\n**Update of Criticality on 2026-03-06**: We've made a mistake and over-rated the criticality of this bug in our initial triage. We have calibrated our vulnerability rating internally and updated the criticality of this bug to be Informational (Negligible Impact, Possible Likelihood)\nAffected versions: <= v0.38.16, v1.0.0\nAffected users: Validators, Full nodes\n\n### Impact\n\nA malicious peer may be able to interfere with a node's ability to sync blocks with peers via the blocksync mechanism. \n\nIn the `blocksync` protocol peers send their `base` and `latest` heights when they connect to a new node (`A`), which is syncing to the tip of a network. `base` acts as a lower ground and informs `A` that the peer only has blocks starting from height `base`. `latest` height informs `A` about the latest block in a network. Normally, nodes would only report increasing heights:\n\n```\nB: {base: 100, latest: 1000}\nB: {base: 100, latest: 1001}\nB: {base: 100, latest: 1002}\n...\n```\n\nIf `B` fails to provide the latest block, `B` is removed and the `latest` height (target height) is recalculated based on other nodes `latest` heights.\n\nThe existing code hovewer doesn't check for the case where `B` first reports `latest` height `X` and immediately after height `Y`, where `X > Y`. For example:\n\n```\nB: {base: 100, latest: 2000}\nB: {base: 100, latest: 1001}\nB: {base: 100, latest: 1002}\n...\n```\n\n`A` will be trying to catch up to 2000 indefinitely. Even if `B` disconnects, the `latest` height (target height) won't be recalculated because `A` \"doesn't know where 2000\" came from per see.\n\n#### Impact Qualification\n\nThis condition requires the introduction of malicious code in the full node first reporting a non-existing `latest` height, then reporting lower `latest` height and nodes which are syncing using `blocksync` protocol.\n\n### Patches\n\nThe new CometBFT releases [v1.0.1](https://github.com/cometbft/cometbft/releases/tag/v1.0.1) and [v0.38.17](https://github.com/cometbft/cometbft/releases/tag/v0.38.17) fix this issue.\n\nUnreleased code in the main is patched as well.\n\n### Workarounds\n\nWhen the operator notices `blocksync` is stuck, they can identify the peer from which that message with \"invalid\" height was received. This may require increasing the logging level of the `blocksync` module. This peer can then be subsequently banned at the p2p layer as a temporary mitigation.\n\n### References\n\nIf you have questions about Interchain security efforts, please reach out to our official communication channel at [security@interchain.io](mailto:security@interchain.io). For more information about the Interchain Foundation’s engagement with Amulet, and to sign up for security notification emails, please see https://github.com/interchainio/security. \n\nA Github Security Advisory for this issue is available in the CometBFT [repository](https://github.com/cometbft/cometbft/security/advisories/GHSA-22qq-3xwm-r5x4). For more information about CometBFT, see https://docs.cometbft.com/.\n\nEDIT:\n\nPlease notice that this has been updated to be `informational` severity. This can be avoided by ensuring that one is not connected to a malicious peer during blocksync.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cometbft/cometbft"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0-alpha.1"
}, {
"fixed" : "1.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cometbft/cometbft"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.38.17"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cometbft/cometbft/security/advisories/GHSA-22qq-3xwm-r5x4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24371"
}, {
"type" : "WEB",
"url" : "https://github.com/cometbft/cometbft/commit/0ee80cd609c7ae9fe856bdd1c6d38553fdae90ce"
}, {
"type" : "WEB",
"url" : "https://github.com/cometbft/cometbft/commit/2cebfde06ae5073c0b296a9d2ca6ab4b95397ea5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cometbft/cometbft"
}, {
"type" : "WEB",
"url" : "https://github.com/cometbft/cometbft/releases/tag/v0.38.17"
}, {
"type" : "WEB",
"url" : "https://github.com/cometbft/cometbft/releases/tag/v1.0.1"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3442"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-703" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-03T15:55:28Z",
"nvd_published_at" : "2025-02-03T22:15:28Z"
}
}