HighGHSA-hrhf-2vcr-ghchGO-2025-4025

CometBFT's invalid BitArray handling can lead to network halt

Published 14 Oct 2025 · Updated 18 Nov 2025

Is your project on an affected github.com/cometbft/cometbft?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<0.37.16
Fixed in
0.37.16
Update to the fixed version for your release line, for example:go get github.com/cometbft/cometbft@v0.37.16
Affected
>=0.38.0-alpha.1 <0.38.19
Fixed in
0.38.19
Update to the fixed version for your release line, for example:go get github.com/cometbft/cometbft@v0.38.19

Details

Name: 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](mailto: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/.

Is GHSA-hrhf-2vcr-ghch in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/cometbft/cometbft, and gives you the command that fixes it.

More advisories for github.com/cometbft/cometbft

  • LowGO-2026-4361Inconsistencies between how commit signatures are verified and how block time is derived in github.com/cometbft/cometbft · 19 Feb 2026
  • HighGHSA-c32p-wcqj-j677CometBFT has inconsistencies between how commit signatures are verified and how block time is derived · 23 Jan 2026
  • LowCVE-2025-24371CometBFT allows a malicious peer to make node stuck in blocksync in github.com/cometbft/cometbft · 4 Feb 2025
  • LowGO-2025-3443CometBFT allows a malicious peer to stall network by disseminating valid-looking block parts in github.com/cometbft/cometbft · 4 Feb 2025
  • HighGHSA-r3r4-g7hq-pq4fCometBFT allows a malicious peer to stall the network by disseminating seemingly valid block parts · 3 Feb 2025
  • MediumCVE-2025-24371CometBFT allows a malicious peer to make node stuck in blocksync · 3 Feb 2025
All 21 advisories for github.com/cometbft/cometbft

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.