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