GHSA-HRHF-2VCR-GHCH
Vulnerability from github – Published: 2025-10-14 19:57 – Updated: 2025-11-18 18:37Name: ASA-2025-003: Invalid BitArray handling can lead to network halt
Criticality: High (Considerable Impact; Possible Likelihood per ACMv1.2)
Affected versions: <= v0.38.18, <= v0.37.15, and main development branches
Affected users: Validators, Full nodes, Users
Description
A bug was discovered in CometBFT's handling of BitArray's that have a mismatch between the BitArray's expected number of Elems for the specified number of Bits. Additional validation was added to prevent processing BitArray's in this invalid state, as well as guards to prevent panics on BitArray methods if one of these invalid states is processed.
Impact
BitArray's are present in a number of messages received from peers. When handling these messages, insufficient validation was applied to prevent processing messages the aforementioned invalid state. In the worst case, nodes will gossip messages to peers in an invalid state before processing them themselves, leading to a network halt (instead of only the node receiving the malicious message crashing).
Patches
The new CometBFT releases v0.38.19 and v0.37.16 fix this issue.
Unreleased code in the main branch is patched as well.
Workarounds
If a node is able to identify a malicious peer sending these payloads, they can ban the ip address using common tools like iptables.
Timeline
- October 3, 2025, 11:26am EST: Issue reported to Cosmos Labs via an external team (via their Bug Bounty Program).
- October 3, 2025, 11:59am EST: Issue triaged by core team and core team completes validation of issue.
- October 6, 2025, 11:14pm EST: Issue reported to the Cosmos Bug Bounty Program (by original white hat reporter).
- October 9, 2025, 11:15am EST: Pre-notification delivered.
- October 10, 2025, 11:37am EST: Core team completes patch for the issue.
- October 14, 2025, 11:00am EST: Patch made available.
This issue was reported by @whoismxuse to the Cosmos Bug Bounty Program on HackerOne on October 6, 2025. If you believe you have found a bug in the Cosmos Stack or would like to contribute to the program by reporting a bug, please see https://hackerone.com/cosmos.
If there are questions about Cosmos security efforts, please reach out to our official communication channel at security@cosmoslabs.io.
A Github Security Advisory for this issue is available in the CometBFT repository. For more information about CometBFT, see https://docs.cometbft.com/.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.37.15"
},
"package": {
"ecosystem": "Go",
"name": "github.com/cometbft/cometbft"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.37.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.38.18"
},
"package": {
"ecosystem": "Go",
"name": "github.com/cometbft/cometbft"
},
"ranges": [
{
"events": [
{
"introduced": "0.38.0-alpha.1"
},
{
"fixed": "0.38.19"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-228"
],
"github_reviewed": true,
"github_reviewed_at": "2025-10-14T19:57:30Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "Name: ASA-2025-003: Invalid BitArray handling can lead to network halt\nCriticality: High (Considerable Impact; Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))\nAffected versions: `\u003c= v0.38.18`, `\u003c= v0.37.15`, and `main` development branches\nAffected users: Validators, Full nodes, Users\n\n### Description\n\nA bug was discovered in CometBFT\u0027s handling of `BitArray`\u0027s that have a mismatch between the `BitArray`\u0027s expected number of `Elems` for the specified number of `Bits`. Additional validation was added to prevent processing `BitArray`\u0027s in this invalid state, as well as guards to prevent panics on `BitArray` methods if one of these invalid states is processed.\n\n### Impact\n`BitArray`\u0027s are present in a number of messages received from peers. When handling these messages, insufficient validation was applied to prevent processing messages the aforementioned invalid state. In the worst case, nodes will gossip messages to peers in an invalid state before processing them themselves, leading to a network halt (instead of only the node receiving the malicious message crashing). \n\n### Patches\n\nThe new CometBFT releases [v0.38.19](https://github.com/cometbft/cometbft/releases/tag/v0.38.19) and [v0.37.16](https://github.com/cometbft/cometbft/releases/tag/v0.37.16) fix this issue.\n\nUnreleased code in the main branch is patched as well.\n\n### Workarounds\n\nIf a node is able to identify a malicious peer sending these payloads, they can ban the ip address using common tools like `iptables`.\n\n### Timeline\n\n* October 3, 2025, 11:26am EST: Issue reported to Cosmos Labs via an external team (via their Bug Bounty Program).\n* October 3, 2025, 11:59am EST: Issue triaged by core team and core team completes validation of issue.\n* October 6, 2025, 11:14pm EST: Issue reported to the Cosmos Bug Bounty Program (by original white hat reporter).\n* October 9, 2025, 11:15am EST: Pre-notification delivered.\n* October 10, 2025, 11:37am EST: Core team completes patch for the issue.\n* October 14, 2025, 11:00am EST: Patch made available.\n\nThis issue was reported by @whoismxuse to the Cosmos Bug Bounty Program on HackerOne on October 6, 2025. If you believe you have found a bug in the Cosmos Stack or would like to contribute to the program by reporting a bug, please see https://hackerone.com/cosmos.\n\nIf there are questions about Cosmos security efforts, please reach out to our official communication channel at [security@cosmoslabs.io](mailto:security@cosmoslabs.io).\n\nA Github Security Advisory for this issue is available in the CometBFT [repository](https://github.com/cometbft/cometbft/security/advisories/GHSA-hrhf-2vcr-ghch). For more information about CometBFT, see https://docs.cometbft.com/.",
"id": "GHSA-hrhf-2vcr-ghch",
"modified": "2025-11-18T18:37:25Z",
"published": "2025-10-14T19:57:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cometbft/cometbft/security/advisories/GHSA-hrhf-2vcr-ghch"
},
{
"type": "WEB",
"url": "https://github.com/cometbft/cometbft/commit/be5677c3e58f998b7f67bb6186dd2c9b81a041a1"
},
{
"type": "WEB",
"url": "https://github.com/cometbft/cometbft/commit/dcb1f265b59477be40804f7ccdc4fb30612d6a4f"
},
{
"type": "PACKAGE",
"url": "https://github.com/cometbft/cometbft"
},
{
"type": "WEB",
"url": "https://github.com/cometbft/cometbft/releases/tag/v0.37.16"
},
{
"type": "WEB",
"url": "https://github.com/cometbft/cometbft/releases/tag/v0.38.19"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "CometBFT\u0027s invalid BitArray handling can lead to network halt"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.