Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/cometbft/cometbft/light
  4. ›
  5. GHSA-g5xx-c4hv-9ccc

GHSA-g5xx-c4hv-9ccc: CometBFT's state syncing validator from malicious node may lead to a chain split

September 3, 2024 (updated November 18, 2024)

The state sync protocol retrieves a snapshot of the application and installs it in a fresh node. In order for this node to be ready to run consensus and block sync from the installed snapshot height, we also need to install a valid State in the node, which is the starting state from which it is able to validate new blocks and append them to the blockchain.

The State object used by state sync is computed using the light client protocol, which retrieves information about committed blocks from at least two RPC endpoints. The light client protocol performs several state validations and, in particular, compares the state provided by different RPC endpoints, looking for inconsistencies.

The State object contains, among other fields, a Validators field which stores the current validator set. A validator set is a list of validator addresses, public keys and associated voting powers, one per validator. It also stores, for historical reasons, the state of the proposer selection algorithm, in the form of the ProposerPriority field associated with each Validator.

While the light client is able to validate the ValidatorSet retrieved from RPC endpoints, this validation does not include the ProposerPriority field associated with each Validator. As a result, when state sync adopts RPC endpoints that, for unknown reasons, provide an invalid state of the proposer selection algorithm, the node will not be able to properly run the consensus protocol, as their local view of which validator is the proposer of a given round and height will disagree with the views of the correct validators. If an increasing number of validators state sync using RPC endpoints with invalid states, the network eventually halts.

References

  • github.com/advisories/GHSA-g5xx-c4hv-9ccc
  • github.com/cometbft/cometbft
  • github.com/cometbft/cometbft/commit/3937e00a339ee6b861d75997b4f6c87d867b74f2
  • github.com/cometbft/cometbft/commit/52c00a537f8f56ed94b4a5c8af6e3fecff468b55
  • github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc
  • pkg.go.dev/vuln/GO-2024-3112

Code Behaviors & Features

Detect and mitigate GHSA-g5xx-c4hv-9ccc with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.34.0 before 0.34.34, all versions starting from 0.37.0 before 0.37.11, all versions starting from 0.38.0 before 0.38.12

Fixed versions

  • 0.34.34
  • 0.37.11
  • 0.38.12

Solution

Upgrade to versions 0.34.34, 0.37.11, 0.38.12 or above.

Impact 4.7 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:L

Learn more about CVSS

Source file

go/github.com/cometbft/cometbft/light/GHSA-g5xx-c4hv-9ccc.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 00:15:03 +0000.