GHSA-g5xx-c4hv-9ccc: Github.com/cometbft/cometbft/light CometBFT's State Syncing Validator From Vulnerability

LOW
CVSS 4.7
Published
Advisory Summary

GHSA-g5xx-c4hv-9ccc is a LOW (CVSS 4.7) cometbft's state syncing validator from vulnerability (General Security Weakness) affecting Github.com/cometbft/cometbft/light libraries in the Go ecosystem. The issue involves cometbft's state syncing validator from malicious node may lead to a chain split. Remediation is available by upgrading affected packages to version 0.34.34, 0.37.11, 0.38.12.

GHSA-g5xx-c4hv-9ccc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-g5xx-c4hv-9ccc
Severity LOW
CVSS v3.1 Base Score 4.7
CWE Classification General Security Weakness
Affected Product Github.com/cometbft/cometbft/light
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-g5xx-c4hv-9ccc

To remediate this vulnerability, upgrade all affected Github.com/cometbft/cometbft/light dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cometbft/cometbft/light fixed: 0.34.34
Upgrade github.com/cometbft/cometbft/light to 0.34.34
github.com/cometbft/cometbft/light fixed: 0.37.11
Upgrade github.com/cometbft/cometbft/light to 0.37.11
github.com/cometbft/cometbft/light fixed: 0.38.12
Upgrade github.com/cometbft/cometbft/light to 0.38.12
github.com/cometbft/cometbft fixed: 0.37.11
Upgrade github.com/cometbft/cometbft to 0.37.11
github.com/cometbft/cometbft fixed: 0.38.12
Upgrade github.com/cometbft/cometbft to 0.38.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cometbft/cometbft/light

How to Check if You Are Affected

To determine whether your application is affected by GHSA-g5xx-c4hv-9ccc, inspect your project dependencies for Github.com/cometbft/cometbft/light:

inspect dependencies for github.com/cometbft/cometbft/light

Analyze the terminal output to locate any version of Github.com/cometbft/cometbft/light in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.34.34), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Github.com/cometbft/cometbft/light, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**Name**: ASA-2024-009: State syncing validator from malicious node may lead to a chain split **Component**: CometBFT **Criticality**: Medium ([ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L: Possible) **Affected versions**: >= 0.34.0, <= 0.34.33, >=0.37.0, <= 0.37.10, >= 0.38.0, <= 0.38.11 ### Summary 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. ### Patches Release versions 0.34.34, 0.37.11, and 0.38.12 include a patch to address this issue. In the patched versions, the light client protocol compares the `ProposerPriority` fields of the `ValidatorSet` instances retrieved from the RPC endpoints configured for state sync. If they differ, the computed `State` object is considered invalid and state sync will fail with an error. ### Workarounds The issue is observed when validators run state sync using RPC nodes that are malicious or report invalid states for the proposer selection algorithm. It is worth noting that non-malicious nodes running upstream software should never report an invalid state for the proposer selection algorithm. This situation may result from the adoption of nodes with customized code or which had their state, stored in local databases, manually updated. When the network public's RPC endpoints have an invalid state for the proposer election algorithm, there, new validators should refrain from using state sync for bootstrapping or be sure that they configure for state sync RPC endpoints with a valid state of the proposer election algorithm. A validator with an invalid state for the proposer selection algorithm will reject most of the proposed blocks and will have the network rejecting blocks it has proposed. It is also possible to manually compare the state of the proposer election algorithm of nodes by comparing the outputs of the `/validators?height=_` RPC endpoints. The outputs must fully match, including the ProposerPriority field associated with each validator. ### References * [State Sync documentation](https://docs.cometbft.com/v0.38/core/state-sync) This issue was reported to the Cosmos Bug Bounty Program on HackerOne on 12/08/24. If you believe you have found a bug in the Interchain Stack or would like to contribute to the program by reporting a bug, please see [https://hackerone.com/cosmos](https://hackerone.com/cosmos). If you have questions about Interchain security efforts, please reach out to our official communication channel at [security@interchain.io](mailto:security@interchain.io). For more information about CometBFT, please see [https://docs.cometbft.com/](https://docs.cometbft.com/). For more information about the Interchain Foundation’s engagement with Amulet, please see [https://github.com/interchainio/security](https://github.com/interchainio/security).

GHSA-g5xx-c4hv-9ccc Affected Github.com/cometbft/cometbft/light Versions

5 component(s)
Fixed Versions:
0.34.340.37.110.38.12
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cometbft/cometbft/light
Go
≥ 0.34.0
< 0.34.34
0.34.34
github.com/cometbft/cometbft/light
Go
≥ 0.37.0
< 0.37.11
0.37.11
github.com/cometbft/cometbft/light
Go
≥ 0.38.0
< 0.38.12
0.38.12
github.com/cometbft/cometbft
Go
≥ 0.37.0
< 0.37.11
0.37.11
github.com/cometbft/cometbft
Go
≥ 0.38.0
< 0.38.12
0.38.12

References

Frequently Asked Questions

What is GHSA-g5xx-c4hv-9ccc?
GHSA-g5xx-c4hv-9ccc is a security vulnerability in Github.com/cometbft/cometbft/light involving CometBFT's state syncing validator from malicious node may lead to a chain split under General Security Weakness.
Which Github.com/cometbft/cometbft/light versions are affected?
Affected versions include releases prior to 0.34.34, 0.37.11, 0.38.12 across affected packages: github.com/cometbft/cometbft/light, github.com/cometbft/cometbft.
What version fixes GHSA-g5xx-c4hv-9ccc?
Upgrading to 0.34.34, 0.37.11, 0.38.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cometbft/cometbft/light affected?
Yes, github.com/cometbft/cometbft/light is affected in releases prior to 0.34.34, 0.37.11, 0.38.12. Upgrade your dependency to 0.34.34, 0.37.11, 0.38.12 or later.
Is github.com/cometbft/cometbft affected?
Yes, github.com/cometbft/cometbft is affected in releases prior to 0.37.11, 0.38.12. Upgrade your dependency to 0.37.11, 0.38.12 or later.
What is the CVSS score of GHSA-g5xx-c4hv-9ccc?
GHSA-g5xx-c4hv-9ccc has a CVSS v3.1 base score of 4.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:L.
What CWE is associated with GHSA-g5xx-c4hv-9ccc?
GHSA-g5xx-c4hv-9ccc is classified under General Security Weakness.
How can I check Go dependencies for GHSA-g5xx-c4hv-9ccc?
Run the dependency tree command: 'inspect dependencies for github.com/cometbft/cometbft/light'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g5xx-c4hv-9ccc",
  "modified" : "2024-11-18T16:27:09Z",
  "published" : "2024-09-03T20:03:08Z",
  "aliases" : [ ],
  "summary" : "CometBFT's state syncing validator from malicious node may lead to a chain split",
  "details" : "**Name**: ASA-2024-009: State syncing validator from malicious node may lead to a chain split\n**Component**: CometBFT\n**Criticality**: Medium ([ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L: Possible)\n**Affected versions**: >= 0.34.0, <= 0.34.33, >=0.37.0, <= 0.37.10, >= 0.38.0, <= 0.38.11\n\n### Summary\n\nThe 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.\n\nThe `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.\n\nThe `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`.\n\nWhile 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.\n\n### Patches\n\nRelease versions 0.34.34, 0.37.11, and 0.38.12 include a patch to address this issue.\n\nIn the patched versions, the light client protocol compares the `ProposerPriority` fields of the `ValidatorSet` instances retrieved from the RPC endpoints configured for state sync. If they differ, the computed `State` object is considered invalid and state sync will fail with an error.\n\n### Workarounds\n\nThe issue is observed when validators run state sync using RPC nodes that are malicious or report invalid states for the proposer selection algorithm.\n\nIt is worth noting that non-malicious nodes running upstream software should never report an invalid state for the proposer selection algorithm. This situation may result from the adoption of nodes with customized code or which had their state, stored in local databases, manually updated.\n\nWhen the network public's RPC endpoints have an invalid state for the proposer election algorithm, there, new validators should refrain from using state sync for bootstrapping or be sure that they configure for state sync RPC endpoints with a valid state of the proposer election algorithm.\n\nA validator with an invalid state for the proposer selection algorithm will reject most of the proposed blocks and will have the network rejecting blocks it has proposed.  It is also possible to manually compare the state of the proposer election algorithm of nodes by comparing the outputs of the `/validators?height=_`  RPC endpoints. The outputs must fully match, including the ProposerPriority field associated with each validator. \n\n\n### References\n\n* [State Sync documentation](https://docs.cometbft.com/v0.38/core/state-sync)\n\nThis issue was reported to the Cosmos Bug Bounty Program on HackerOne on 12/08/24. If you believe you have found a bug in the Interchain Stack or would like to contribute to the program by reporting a bug, please see [https://hackerone.com/cosmos](https://hackerone.com/cosmos).\n\nIf you have questions about Interchain security efforts, please reach out to our official communication channel at [security@interchain.io](mailto:security@interchain.io).\n\nFor more information about CometBFT, please see [https://docs.cometbft.com/](https://docs.cometbft.com/).\n\nFor more information about the Interchain Foundation’s engagement with Amulet, please see [https://github.com/interchainio/security](https://github.com/interchainio/security).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft/light"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.34.0"
      }, {
        "fixed" : "0.34.34"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft/light"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.37.0"
      }, {
        "fixed" : "0.37.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft/light"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.38.0"
      }, {
        "fixed" : "0.38.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.37.0"
      }, {
        "fixed" : "0.37.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.38.0"
      }, {
        "fixed" : "0.38.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/commit/3937e00a339ee6b861d75997b4f6c87d867b74f2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/commit/52c00a537f8f56ed94b4a5c8af6e3fecff468b55"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cometbft/cometbft"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3112"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-03T20:03:08Z",
    "nvd_published_at" : null
  }
}