Improper Handling of Syntactically Invalid Structure Affecting github.com/cometbft/cometbft/consensus package, versions <0.37.16>0.38.0-alpha.1 <0.38.19


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMCOMETBFTCOMETBFTCONSENSUS-13553936
  • published15 Oct 2025
  • disclosed14 Oct 2025
  • creditwhoismxuse

Introduced: 14 Oct 2025

New CVE NOT AVAILABLE CWE-228  (opens in a new tab)

How to fix?

Upgrade github.com/cometbft/cometbft/consensus to version 0.37.16, 0.38.19 or higher.

Overview

github.com/cometbft/cometbft/consensus is a Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine - written in any programming language - and securely replicates it on many machines.

Affected versions of this package are vulnerable to Improper Handling of Syntactically Invalid Structure via the handling of BitArray objects with mismatched Elems and Bits values. An attacker can cause network disruption or halt by sending specially crafted messages containing invalid BitArray states to peers, which may then propagate these messages throughout the network before processing them themselves.

Workaround

This vulnerability can be mitigated by banning the IP address of malicious peers using tools such as iptables.

CVSS Base Scores

version 4.0
version 3.1