GHSA-95rx-m9m5-m94v: ASA-2024-006 ValidateVoteExtensions Helper Function Vulnerability

HIGH
CVSS 7.1
CWE-20
Published
Advisory Summary

GHSA-95rx-m9m5-m94v is a HIGH (CVSS 7.1) validatevoteextensions helper function vulnerability (CWE-20: Improper Input Validation) affecting ASA-2024-006 libraries in the Go ecosystem. The issue involves validatevoteextensions helper function in cosmos sdk may allow incorrect voting power assumptions. Remediation is available by upgrading affected packages to version 0.50.5.

GHSA-95rx-m9m5-m94v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-95rx-m9m5-m94v
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-20: Improper Input Validation
Affected Product ASA-2024-006
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.1

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

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

How to Fix GHSA-95rx-m9m5-m94v

To remediate this vulnerability, upgrade all affected ASA-2024-006 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/cosmos/cosmos-sdk fixed: 0.50.5
Upgrade github.com/cosmos/cosmos-sdk to 0.50.5
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/cosmos/cosmos-sdk

How to Check if You Are Affected

To determine whether your application is affected by GHSA-95rx-m9m5-m94v, inspect your project dependencies for ASA-2024-006:

inspect dependencies for github.com/cosmos/cosmos-sdk

Analyze the terminal output to locate any version of ASA-2024-006 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.50.5), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In ASA-2024-006, 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

## ASA-2024-006: ValidateVoteExtensions helper function may allow incorrect voting power assumptions **Component**: Cosmos SDK **Criticality**: High **Affected Versions**: Cosmos SDK versions <= 0.50.4, on 0.50 branches **Affected Users**: Chain developers, Validator and Node operators **Impact**: Elevation of Privilege ## Summary The default `ValidateVoteExtensions` helper function infers total voting power based off of the injected `VoteExtension`, which are injected by the proposer. If your chain utilizes the `ValidateVoteExtensions` helper in `ProcessProposal`, a dishonest proposer can potentially mutate voting power of each validator it includes in the injected `VoteExtension`, which could have potentially unexpected or negative consequences on modified state. Additional validation on injected `VoteExtension` data was added to confirm voting power against the state machine. ## Next Steps for Impacted Parties If you are a chain developer on an affected version of the Cosmos SDK, it is advised to update to the latest available version of the Cosmos SDK for your project. Once a patched version is available, it is recommended that network operators upgrade. A Github Security Advisory for this issue is available in the Cosmos-SDK [repository](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-95rx-m9m5-m94v). For more information about Cosmos SDK, see https://docs.cosmos.network/.

GHSA-95rx-m9m5-m94v Affected ASA-2024-006 Versions

1 component(s)
Fixed Versions:
0.50.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cosmos/cosmos-sdk
Go
≥ 0.50.0
< 0.50.5
0.50.5

References

Frequently Asked Questions

What is GHSA-95rx-m9m5-m94v?
GHSA-95rx-m9m5-m94v is a security vulnerability in ASA-2024-006 involving ValidateVoteExtensions helper function in Cosmos SDK may allow incorrect voting power assumptions under CWE-20: Improper Input Validation.
Which ASA-2024-006 versions are affected?
Affected versions include releases prior to 0.50.5 across affected packages: github.com/cosmos/cosmos-sdk.
What version fixes GHSA-95rx-m9m5-m94v?
Upgrading to 0.50.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cosmos/cosmos-sdk affected?
Yes, github.com/cosmos/cosmos-sdk is affected in releases prior to 0.50.5. Upgrade your dependency to 0.50.5 or later.
What is the CVSS score of GHSA-95rx-m9m5-m94v?
GHSA-95rx-m9m5-m94v has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H.
What CWE is associated with GHSA-95rx-m9m5-m94v?
GHSA-95rx-m9m5-m94v is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Go dependencies for GHSA-95rx-m9m5-m94v?
Run the dependency tree command: 'inspect dependencies for github.com/cosmos/cosmos-sdk'. 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-95rx-m9m5-m94v",
  "modified" : "2024-04-02T14:51:13Z",
  "published" : "2024-03-12T15:50:23Z",
  "aliases" : [ ],
  "summary" : "ASA-2024-006: ValidateVoteExtensions helper function in Cosmos SDK may allow incorrect voting power assumptions",
  "details" : "## ASA-2024-006: ValidateVoteExtensions helper function may allow incorrect voting power assumptions\n\n**Component**: Cosmos SDK\n**Criticality**: High\n**Affected Versions**: Cosmos SDK versions <= 0.50.4, on 0.50 branches\n**Affected Users**: Chain developers, Validator and Node operators\n**Impact**: Elevation of Privilege\n\n## Summary\n\nThe default `ValidateVoteExtensions` helper function infers total voting power based off of the injected `VoteExtension`, which are injected by the proposer.  If your chain utilizes the `ValidateVoteExtensions` helper in `ProcessProposal`, a dishonest proposer can potentially mutate voting power of each validator it includes in the injected `VoteExtension`, which could have potentially unexpected or negative consequences on modified state.  Additional validation on injected `VoteExtension` data was added to confirm voting power against the state machine.\n\n## Next Steps for Impacted Parties\n\nIf you are a chain developer on an affected version of the Cosmos SDK, it is advised to update to the latest available version of the Cosmos SDK for your project.  Once a patched version is available, it is recommended that network operators upgrade.\n\nA Github Security Advisory for this issue is available in the Cosmos-SDK [repository](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-95rx-m9m5-m94v). For more information about Cosmos SDK, see https://docs.cosmos.network/.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.50.0"
      }, {
        "fixed" : "0.50.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.50.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-95rx-m9m5-m94v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/commit/4467110df40797ebe916c23ebfd45c9ee7583897"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cosmos/cosmos-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-12T15:50:23Z",
    "nvd_published_at" : null
  }
}