Improper Validation of Array Index Affecting github.com/cometbft/cometbft/consensus package, versions >=0.38.0 <0.38.15 >=1.0.0-alpha.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

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 ID SNYK-GOLANG-GITHUBCOMCOMETBFTCOMETBFTCONSENSUS-8349750
  • published 7 Nov 2024
  • disclosed 6 Nov 2024
  • credit corverroos

Introduced: 6 Nov 2024

New CVE NOT AVAILABLE CWE-129 Open this link in a new tab

How to fix?

Upgrade github.com/cometbft/cometbft/consensus to version 0.38.15 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 Validation of Array Index via the ValidatorIndex field. An attacker can cause the node to crash by producing and sending a malformed Vote message.

Note:

This is only exploitable if vote extensions are enabled and the attacker can modify the Vote message to include an invalid ValidatorIndex.

Workaround

This vulnerability can be mitigated by increasing the logging level of the consensus module and banning the malicious peer at the p2p layer.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
8.3 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    None
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None