GHSA-8wcc-m6j2-qxvm: ASA-2024-0012, ASA-2024-0013 Remote Code Execution Vulnerability

HIGH
CWE-400 CWE-674
Published
Advisory Summary

GHSA-8wcc-m6j2-qxvm is a HIGH remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting ASA-2024-0012, ASA-2024-0013 libraries in the Go ecosystem. The issue involves cosmossdk: transaction decoding may result in a stack overflow or resource exhaustion. Remediation is available by upgrading affected packages to version 0.50.11, 0.47.15, 0.13.7.

GHSA-8wcc-m6j2-qxvm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8wcc-m6j2-qxvm
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product ASA-2024-0012, ASA-2024-0013
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-8wcc-m6j2-qxvm

To remediate this vulnerability, upgrade all affected ASA-2024-0012, ASA-2024-0013 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.11
Upgrade github.com/cosmos/cosmos-sdk to 0.50.11
github.com/cosmos/cosmos-sdk fixed: 0.47.15
Upgrade github.com/cosmos/cosmos-sdk to 0.47.15
cosmossdk.io/x/tx fixed: 0.13.7
Upgrade cosmossdk.io/x/tx to 0.13.7
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-8wcc-m6j2-qxvm, inspect your project dependencies for ASA-2024-0012, ASA-2024-0013:

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

Analyze the terminal output to locate any version of ASA-2024-0012, ASA-2024-0013 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.50.11), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In ASA-2024-0012, ASA-2024-0013, 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

## Summary ### ASA-2024-0012 Name: ASA-2024-0012, Transaction decoding may result in a stack overflow Component: Cosmos SDK Criticality: High (Considerable Impact, and Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md)) Affected versions: cosmos-sdk versions <= v0.50.10, <= v0.47.14 Affected users: Chain Builders + Maintainers, Validators, node operators ### ASA-2024-0013 Name: ASA-2024-0013: CosmosSDK: Transaction decoding may result in resource exhaustion Component: Cosmos SDK Criticality: High (Considerable Impact, and Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md)) Affected versions: cosmos-sdk versions <= v0.50.10, <= v0.47.14 Affected users: Chain Builders + Maintainers, Validators, node operators ### Impact ### ASA-2024-0012 When decoding a maliciously formed packet with a deeply-nested structure, it may be possible for a stack overflow to occur and result in a network halt. This was addressed by adding a recursion limit while decoding the packet. ### ASA-2024-0013 Nested messages in a transaction can consume exponential cpu and memory on `UnpackAny` calls. The`max_tx_bytes` sets a limit for external TX but is not applied for internal messages emitted by wasm contracts or a malicious validator block. This may result in a node crashing due to resource exhaustion. This was addressed by adding additional validation to prevent this condition. ### Patches The issues above are resolved in Cosmos SDK versions v0.47.15 or v0.50.11. Please upgrade ASAP. ### Timeline for ASA-2024-0012 * October 1, 2024, 12:29pm UTC: Issue reported to the Cosmos Bug Bounty program * October 1, 2024, 2:47pm UTC: Issue triaged by Amulet on-call, and distributed to Core team * December 9, 2024, 11:13am UTC: Core team completes patch for issue * Dec 14, 2024,16:00 UTC: Pre-notification delivered * Dec 16, 2024, 16:00 UTC: Patch made available This issue was reported to the Cosmos Bug Bounty Program on HackerOne on October 1, 2024. ### Timeline for ASA-2024-0013 * October 19, 2024, 8:12pm UTC: Issue reported to the Cosmos Bug Bounty program * October 19, 2024, 8:28pm UTC: Issue triaged by Amulet on-call, and distributed to Core team * December 11, 2024, 3:31pm UTC: Core team completes patch for issue * Dec 14, 2024, 16:00 UTC: Pre-notification delivered * Dec 16, 2024, 16:00 UTC: Patch made available This issue was reported by LonelySloth to the Cosmos Bug Bounty Program on HackerOne on October 19, 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. 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 the Interchain Foundation’s engagement with Amulet, and to sign up for security notification emails, please see https://github.com/interchainio/security.

GHSA-8wcc-m6j2-qxvm Affected ASA-2024-0012, ASA-2024-0013 Versions

3 component(s)
Fixed Versions:
0.50.110.47.150.13.7
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cosmos/cosmos-sdk
Go
≥ 0.50.0-alpha.0
< 0.50.11
0.50.11
github.com/cosmos/cosmos-sdk
Go
< 0.47.15
0.47.15
cosmossdk.io/x/tx
Go
< 0.13.7
0.13.7

References

Frequently Asked Questions

What is GHSA-8wcc-m6j2-qxvm?
GHSA-8wcc-m6j2-qxvm is a security vulnerability in ASA-2024-0012, ASA-2024-0013 involving CosmosSDK: Transaction decoding may result in a stack overflow or resource exhaustion under CWE-400: Uncontrolled Resource Consumption.
Which ASA-2024-0012, ASA-2024-0013 versions are affected?
Affected versions include releases prior to 0.50.11, 0.47.15, 0.13.7 across affected packages: github.com/cosmos/cosmos-sdk, cosmossdk.io/x/tx.
What version fixes GHSA-8wcc-m6j2-qxvm?
Upgrading to 0.50.11, 0.47.15, 0.13.7 (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.11, 0.47.15. Upgrade your dependency to 0.50.11, 0.47.15 or later.
Is cosmossdk.io/x/tx affected?
Yes, cosmossdk.io/x/tx is affected in releases prior to 0.13.7. Upgrade your dependency to 0.13.7 or later.
What CWE is associated with GHSA-8wcc-m6j2-qxvm?
GHSA-8wcc-m6j2-qxvm is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for GHSA-8wcc-m6j2-qxvm?
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-8wcc-m6j2-qxvm",
  "modified" : "2024-12-23T17:13:22Z",
  "published" : "2024-12-16T19:33:30Z",
  "aliases" : [ ],
  "summary" : "ASA-2024-0012, ASA-2024-0013: CosmosSDK: Transaction decoding may result in a stack overflow or resource exhaustion ",
  "details" : "## Summary \n\n### ASA-2024-0012\nName: ASA-2024-0012,  Transaction decoding may result in a stack overflow\nComponent: Cosmos SDK\nCriticality: High (Considerable Impact, and Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))\nAffected versions: cosmos-sdk versions <= v0.50.10, <= v0.47.14\nAffected users: Chain Builders + Maintainers, Validators, node operators\n\n### ASA-2024-0013\nName: ASA-2024-0013: CosmosSDK: Transaction decoding may result in resource exhaustion  \nComponent: Cosmos SDK\nCriticality: High (Considerable Impact, and Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))\nAffected versions: cosmos-sdk versions <= v0.50.10, <= v0.47.14\nAffected users: Chain Builders + Maintainers, Validators, node operators\n\n\n\n### Impact\n\n### ASA-2024-0012\n\nWhen decoding a maliciously formed packet with a deeply-nested structure, it may be possible for a stack overflow to occur and result in a network halt. This was addressed by adding a recursion limit while decoding the packet.\n\n### ASA-2024-0013\n\nNested messages in a transaction can consume exponential cpu and memory on `UnpackAny` calls.  The`max_tx_bytes` sets a limit for external TX but is not applied for internal messages emitted by wasm contracts or a malicious validator block. This may result in a node crashing due to resource exhaustion.  This was addressed by adding additional validation to prevent this condition.\n\n\n### Patches\n\nThe issues above are resolved in Cosmos SDK versions v0.47.15 or v0.50.11.\nPlease upgrade ASAP.\n\n### Timeline for ASA-2024-0012\n\n* October 1, 2024, 12:29pm UTC: Issue reported to the Cosmos Bug Bounty program\n* October 1, 2024, 2:47pm UTC: Issue triaged by Amulet on-call, and distributed to Core team\n* December 9, 2024, 11:13am UTC: Core team completes patch for issue\n* Dec 14, 2024,16:00 UTC: Pre-notification delivered\n* Dec 16, 2024, 16:00 UTC: Patch made available\n\nThis issue was reported to the Cosmos Bug Bounty Program on HackerOne on October 1, 2024.\n\n### Timeline for ASA-2024-0013\n\n* October 19, 2024, 8:12pm UTC: Issue reported to the Cosmos Bug Bounty program\n* October 19, 2024, 8:28pm UTC: Issue triaged by Amulet on-call, and distributed to Core team\n* December 11, 2024, 3:31pm UTC: Core team completes patch for issue\n* Dec 14, 2024, 16:00 UTC: Pre-notification delivered\n* Dec 16, 2024, 16:00 UTC: Patch made available\n\nThis issue was reported by LonelySloth to the Cosmos Bug Bounty Program on HackerOne on October 19, 2024. \n\n\nIf 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).  For more information about the Interchain Foundation’s engagement with Amulet, and to sign up for security notification emails, please see https://github.com/interchainio/security.  ",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.50.0-alpha.0"
      }, {
        "fixed" : "0.50.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.47.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "cosmossdk.io/x/tx"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.13.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-8wcc-m6j2-qxvm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/commit/c6b1bdcd5628e3e425a3f02881d3c7db1d7af653"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cosmos/cosmos-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-674" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-16T19:33:30Z",
    "nvd_published_at" : null
  }
}