GHSA-hg58-rf2h-6rr7: Github.com/cometbft/cometbft CometBFT Is Unstability During Blocksync Vulnerability

MODERATE
CWE-610
Published
Advisory Summary

GHSA-hg58-rf2h-6rr7 is a MODERATE cometbft is unstability during blocksync vulnerability (CWE-610: Externally Controlled Reference to a Resource in Another Sphere) affecting Github.com/cometbft/cometbft libraries in the Go ecosystem. The issue involves cometbft is unstability during blocksync when syncing from malicious peer. Remediation is available by upgrading affected packages to version 0.37.7, 0.38.8.

GHSA-hg58-rf2h-6rr7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hg58-rf2h-6rr7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-610: Externally Controlled Reference to a Resource in Another Sphere
Affected Product Github.com/cometbft/cometbft
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-hg58-rf2h-6rr7

To remediate this vulnerability, upgrade all affected Github.com/cometbft/cometbft 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 fixed: 0.37.7
Upgrade github.com/cometbft/cometbft to 0.37.7
github.com/cometbft/cometbft fixed: 0.38.8
Upgrade github.com/cometbft/cometbft to 0.38.8
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

How to Check if You Are Affected

To determine whether your application is affected by GHSA-hg58-rf2h-6rr7, inspect your project dependencies for Github.com/cometbft/cometbft:

inspect dependencies for github.com/cometbft/cometbft

Analyze the terminal output to locate any version of Github.com/cometbft/cometbft in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.37.7), 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 CWE-610: Externally Controlled Reference to a Resource in Another Sphere, where the product uses an externally controlled name or reference that resolves to a resource that is outside of the intended control sphere. In Github.com/cometbft/cometbft, 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-008: Instability during blocksync when syncing from malicious peer **Component**: CometBFT **Criticality**: Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L: Possible) **Affected versions**: < v0.38.7 # Summary An issue was identified for nodes syncing on an existing network during blocksync in which a malicious peer could cause the syncing peer to panic, enter into a catastrophic invalid syncing state or get stuck in blocksync mode, never switching to consensus. It is recommended for all clients to adopt this patch so that blocksync functions as expected and is tolerant of malicious peers presenting invalid data in this situation. Nodes that are vulnerable to this state may experience a Denial of Service condition in which syncing will not work as expected when joining a network as a client. # Recognition This issue was reported to the Cosmos Bug Bounty Program on HackerOne on 5/01/24 by unknown_feature. 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. 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/. For more information about the Interchain Foundation’s engagement with Amulet, please see https://github.com/interchainio/security.

GHSA-hg58-rf2h-6rr7 Affected Github.com/cometbft/cometbft Versions

2 component(s)
Fixed Versions:
0.37.70.38.8
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cometbft/cometbft
Go
≥ 0.37.0
< 0.37.7
0.37.7
github.com/cometbft/cometbft
Go
≥ 0.38.0
< 0.38.8
0.38.8

References

Frequently Asked Questions

What is GHSA-hg58-rf2h-6rr7?
GHSA-hg58-rf2h-6rr7 is a security vulnerability in Github.com/cometbft/cometbft involving CometBFT is unstability during blocksync when syncing from malicious peer under CWE-610: Externally Controlled Reference to a Resource in Another Sphere.
Which Github.com/cometbft/cometbft versions are affected?
Affected versions include releases prior to 0.37.7, 0.38.8 across affected packages: github.com/cometbft/cometbft.
What version fixes GHSA-hg58-rf2h-6rr7?
Upgrading to 0.37.7, 0.38.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cometbft/cometbft affected?
Yes, github.com/cometbft/cometbft is affected in releases prior to 0.37.7, 0.38.8. Upgrade your dependency to 0.37.7, 0.38.8 or later.
What CWE is associated with GHSA-hg58-rf2h-6rr7?
GHSA-hg58-rf2h-6rr7 is classified under CWE-610: Externally Controlled Reference to a Resource in Another Sphere (The product uses an externally controlled name or reference that resolves to a resource that is outside of the intended control sphere.).
How can I check Go dependencies for GHSA-hg58-rf2h-6rr7?
Run the dependency tree command: 'inspect dependencies for github.com/cometbft/cometbft'. 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-hg58-rf2h-6rr7",
  "modified" : "2024-07-05T21:31:45Z",
  "published" : "2024-06-28T14:33:33Z",
  "aliases" : [ ],
  "summary" : "CometBFT is unstability during blocksync when syncing from malicious peer",
  "details" : "**Name**: ASA-2024-008: Instability during blocksync when syncing from malicious peer\n**Component**: CometBFT\n**Criticality**: Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L: Possible)\n**Affected versions**: < v0.38.7 \n\n# Summary\n\nAn issue was identified for nodes syncing on an existing network during blocksync in which a malicious peer could cause the syncing peer to panic, enter into a catastrophic invalid syncing state or get stuck in blocksync mode, never switching to consensus. It is recommended for all clients to adopt this patch so that blocksync functions as expected and is tolerant of malicious peers presenting invalid data in this situation. Nodes that are vulnerable to this state may experience a Denial of Service condition in which syncing will not work as expected when joining a network as a client.\n\n# Recognition\n\nThis issue was reported to the Cosmos Bug Bounty Program on HackerOne on 5/01/24 by unknown_feature. 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.\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/.\n\nFor more information about the Interchain Foundation’s engagement with Amulet, please see https://github.com/interchainio/security.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.37.0"
      }, {
        "fixed" : "0.37.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cometbft/cometbft"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.38.0"
      }, {
        "fixed" : "0.38.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/security/advisories/GHSA-hg58-rf2h-6rr7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/commit/07866e11139127e415bd0339ac377b6e6a845533"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cometbft/cometbft/commit/8ba2e4f52d5e626e019501ba6420cc86d5de7857"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cometbft/cometbft"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-610" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-28T14:33:33Z",
    "nvd_published_at" : null
  }
}