GHSA-75qh-gg76-p2w4: CWA-2023-004 Excessive Number Of Function Parameters Vulnerability

MODERATE
CVSS 5.3
CWE-400
Published
Advisory Summary

GHSA-75qh-gg76-p2w4 is a MODERATE (CVSS 5.3) excessive number of function parameters vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting CWA-2023-004 libraries in the crates.io ecosystem. The issue involves excessive number of function parameters in compiled wasm. Remediation is available by upgrading affected packages to version 1.2.8, 1.3.4, 1.4.2, 1.5.1, 1.2.5, 1.3.1.

GHSA-75qh-gg76-p2w4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-75qh-gg76-p2w4
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product CWA-2023-004
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix GHSA-75qh-gg76-p2w4

To remediate this vulnerability, upgrade all affected CWA-2023-004 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

cosmwasm-vm fixed: 1.2.8
Upgrade cosmwasm-vm to 1.2.8
cosmwasm-vm fixed: 1.3.4
Upgrade cosmwasm-vm to 1.3.4
cosmwasm-vm fixed: 1.4.2
Upgrade cosmwasm-vm to 1.4.2
cosmwasm-vm fixed: 1.5.1
Upgrade cosmwasm-vm to 1.5.1
github.com/CosmWasm/wasmvm fixed: 1.2.5
Upgrade github.com/CosmWasm/wasmvm to 1.2.5
github.com/CosmWasm/wasmvm fixed: 1.3.1
Upgrade github.com/CosmWasm/wasmvm to 1.3.1
github.com/CosmWasm/wasmvm fixed: 1.4.2
Upgrade github.com/CosmWasm/wasmvm to 1.4.2
github.com/CosmWasm/wasmvm fixed: 1.5.1
Upgrade github.com/CosmWasm/wasmvm to 1.5.1
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 cosmwasm-vm

How to Check if You Are Affected

To determine whether your application is affected by GHSA-75qh-gg76-p2w4, inspect your project dependencies for CWA-2023-004:

inspect dependencies for cosmwasm-vm

Analyze the terminal output to locate any version of CWA-2023-004 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.8), 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 CWA-2023-004, 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

A specifically crafted Wasm file can cause the VM to consume excessive amounts of memory when compiling a contract. This can lead to high memory usage, slowdowns, potentially a crash and can poison a lock in the VM, preventing any further interaction with contracts. For more information, see [CWA-2023-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md).

GHSA-75qh-gg76-p2w4 Affected CWA-2023-004 Versions

8 component(s)
Fixed Versions:
1.2.81.3.41.4.21.5.11.2.51.3.1
Product / Package Ecosystem Affected Versions Fixed Version
cosmwasm-vm
crates.io
< 1.2.8
1.2.8
cosmwasm-vm
crates.io
≥ 1.3.0
< 1.3.4
1.3.4
cosmwasm-vm
crates.io
≥ 1.4.0
< 1.4.2
1.4.2
cosmwasm-vm
crates.io
≥ 1.5.0
< 1.5.1
1.5.1
github.com/CosmWasm/wasmvm
Go
< 1.2.5
1.2.5
github.com/CosmWasm/wasmvm
Go
≥ 1.3.0
< 1.3.1
1.3.1
github.com/CosmWasm/wasmvm
Go
≥ 1.4.0
< 1.4.2
1.4.2
github.com/CosmWasm/wasmvm
Go
≥ 1.5.0
< 1.5.1
1.5.1

References

Frequently Asked Questions

What is GHSA-75qh-gg76-p2w4?
GHSA-75qh-gg76-p2w4 is a security vulnerability in CWA-2023-004 involving Excessive number of function parameters in compiled Wasm under CWE-400: Uncontrolled Resource Consumption.
Which CWA-2023-004 versions are affected?
Affected versions include releases prior to 1.2.8, 1.3.4, 1.4.2, 1.5.1, 1.2.5, 1.3.1 across affected packages: cosmwasm-vm, github.com/CosmWasm/wasmvm.
What version fixes GHSA-75qh-gg76-p2w4?
Upgrading to 1.2.8, 1.3.4, 1.4.2, 1.5.1, 1.2.5, 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cosmwasm-vm affected?
Yes, cosmwasm-vm is affected in releases prior to 1.2.8, 1.3.4, 1.4.2, 1.5.1. Upgrade your dependency to 1.2.8, 1.3.4, 1.4.2, 1.5.1 or later.
Is github.com/CosmWasm/wasmvm affected?
Yes, github.com/CosmWasm/wasmvm is affected in releases prior to 1.2.5, 1.3.1, 1.4.2, 1.5.1. Upgrade your dependency to 1.2.5, 1.3.1, 1.4.2, 1.5.1 or later.
What is the CVSS score of GHSA-75qh-gg76-p2w4?
GHSA-75qh-gg76-p2w4 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with GHSA-75qh-gg76-p2w4?
GHSA-75qh-gg76-p2w4 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 crates.io dependencies for GHSA-75qh-gg76-p2w4?
Run the dependency tree command: 'inspect dependencies for cosmwasm-vm'. 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-75qh-gg76-p2w4",
  "modified" : "2024-12-23T17:13:08Z",
  "published" : "2024-08-27T19:55:40Z",
  "aliases" : [ ],
  "summary" : "CWA-2023-004: Excessive number of function parameters in compiled Wasm",
  "details" : "A specifically crafted Wasm file can cause the VM to consume excessive amounts of memory when compiling a contract.\nThis can lead to high memory usage, slowdowns, potentially a crash and can poison a lock in the VM,\npreventing any further interaction with contracts.\n\nFor more information, see [CWA-2023-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "cosmwasm-vm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "cosmwasm-vm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "cosmwasm-vm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "cosmwasm-vm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/CosmWasm/wasmvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/CosmWasm/wasmvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/CosmWasm/wasmvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/CosmWasm/wasmvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://forum.cosmos.network/t/high-severity-security-patch-upcoming-on-wed-10th-cwa-2023-004-brought-to-you-by-certik-and-confio/12840"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-75qh-gg76-p2w4"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0366.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.certik.com/resources/blog/risk-and-security-enhancement-for-app-chains-an-in-depth-writeup-of-cwa-2023"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-27T19:55:40Z",
    "nvd_published_at" : null
  }
}