GHSA-4j93-fm92-rp4m: ASA-2024-003 Missing `BlockedAddressed` Validation Vulnerability

MODERATE
CVSS 6.5
CWE-20
Published
Advisory Summary

GHSA-4j93-fm92-rp4m is a MODERATE (CVSS 6.5) missing `blockedaddressed` validation vulnerability (CWE-20: Improper Input Validation) affecting ASA-2024-003 libraries in the Go ecosystem. The issue involves missing `blockedaddressed` validation in vesting module. Remediation is available by upgrading affected packages to version 0.50.4, 0.47.9.

GHSA-4j93-fm92-rp4m at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4j93-fm92-rp4m
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-20: Improper Input Validation
Affected Product ASA-2024-003
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-4j93-fm92-rp4m

To remediate this vulnerability, upgrade all affected ASA-2024-003 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.4
Upgrade github.com/cosmos/cosmos-sdk to 0.50.4
github.com/cosmos/cosmos-sdk fixed: 0.47.9
Upgrade github.com/cosmos/cosmos-sdk to 0.47.9
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-4j93-fm92-rp4m, inspect your project dependencies for ASA-2024-003:

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

Analyze the terminal output to locate any version of ASA-2024-003 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.50.4), 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-003, 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-003: Missing `BlockedAddressed` Validation in Vesting Module **Component**: Cosmos SDK **Criticality**: Low **Affected Versions**: Cosmos SDK versions <= 0.50.3; <= 0.47.8 **Affected Users**: Chain developers, Validator and Node operators **Impact**: Denial of Service ## Description A vulnerability was identified in the `x/auth/vesting` module, which can allow a user to create a periodic vesting account on a blocked address, for example a non-initialized module account. Additional validation was added to prevent creation of a periodic vesting account in this scenario. If this case is triggered, there is the potential for a chain halt if the uninitialized account in question is called by `GetModuleAccount` in `Begin`/`EndBlock` of a module. This combination of an uninitialized blocked module account is not common. ## Next Steps for Impacted Parties If your chain has uninitialized blocked module accounts, it is recommended to proactively initialize them, as they are often initialized during a chain migration or during init genesis. 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). For more information about Cosmos SDK, see https://docs.cosmos.network/. This issue was found by [Dongsam](https://github.com/dongsam) who reported it to the Cosmos Bug Bounty Program on HackerOne on January 30, 2024. 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. ## Addendum A variant trigger of this issue via the `x/authz` and `x/feegrant` modules was discovered by [Richie](https://github.com/sushiwushi) who reported it to the Cosmos Bug Bounty Program on HackerOne on April 6th, 2024, and was subsequently fixed by the Cosmos SDK team on April 21st, 2024. The guidance for mitigating this additional variant is the same as the parent advisory, so it is suggested that all chains proactively initialize module accounts if they have not already done so.

GHSA-4j93-fm92-rp4m Affected ASA-2024-003 Versions

2 component(s)
Fixed Versions:
0.50.40.47.9
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cosmos/cosmos-sdk
Go
≥ 0.50.0
< 0.50.4
0.50.4
github.com/cosmos/cosmos-sdk
Go
< 0.47.9
0.47.9

References

Frequently Asked Questions

What is GHSA-4j93-fm92-rp4m?
GHSA-4j93-fm92-rp4m is a security vulnerability in ASA-2024-003 involving Missing `BlockedAddressed` Validation in Vesting Module under CWE-20: Improper Input Validation.
Which ASA-2024-003 versions are affected?
Affected versions include releases prior to 0.50.4, 0.47.9 across affected packages: github.com/cosmos/cosmos-sdk.
What version fixes GHSA-4j93-fm92-rp4m?
Upgrading to 0.50.4, 0.47.9 (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.4, 0.47.9. Upgrade your dependency to 0.50.4, 0.47.9 or later.
What is the CVSS score of GHSA-4j93-fm92-rp4m?
GHSA-4j93-fm92-rp4m has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-4j93-fm92-rp4m?
GHSA-4j93-fm92-rp4m 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-4j93-fm92-rp4m?
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-4j93-fm92-rp4m",
  "modified" : "2024-07-02T02:36:00Z",
  "published" : "2024-02-21T00:12:51Z",
  "aliases" : [ ],
  "summary" : "ASA-2024-003: Missing `BlockedAddressed` Validation in Vesting Module",
  "details" : "## ASA-2024-003: Missing `BlockedAddressed` Validation in Vesting Module\n\n**Component**: Cosmos SDK\n**Criticality**: Low\n**Affected Versions**: Cosmos SDK versions <= 0.50.3; <= 0.47.8\n**Affected Users**: Chain developers, Validator and Node operators\n**Impact**: Denial of Service\n\n## Description\n\nA vulnerability was identified in the `x/auth/vesting` module, which can allow a user to create a periodic vesting account on a blocked address, for example a non-initialized module account. Additional validation was added to prevent creation of a periodic vesting account in this scenario.\n\nIf this case is triggered, there is the potential for a chain halt if the uninitialized account in question is called by `GetModuleAccount` in `Begin`/`EndBlock` of a module. This combination of an uninitialized blocked module account is not common.  \n\n## Next Steps for Impacted Parties\n\nIf your chain has uninitialized blocked module accounts, it is recommended to proactively initialize them, as they are often initialized during a chain migration or during init genesis.\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). For more information about Cosmos SDK, see https://docs.cosmos.network/.\n\nThis issue was found by [Dongsam](https://github.com/dongsam) who reported it to the Cosmos Bug Bounty Program on HackerOne on January 30, 2024. 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\n## Addendum\n\nA variant trigger of this issue via the `x/authz` and `x/feegrant` modules was discovered by [Richie](https://github.com/sushiwushi) who reported it to the Cosmos Bug Bounty Program on HackerOne on April 6th, 2024, and was subsequently fixed by the Cosmos SDK team on April 21st, 2024.  The guidance for mitigating this additional variant is the same as the parent advisory, so it is suggested that all chains proactively initialize module accounts if they have not already done so.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/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.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.50.3"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.47.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.47.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-4j93-fm92-rp4m"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/commit/c05850241e2d615721e3492d15fee4e1deec082b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cosmos/cosmos-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-21T00:12:51Z",
    "nvd_published_at" : null
  }
}