CVE-2022-24738: Github.com/tharsis/evmos Account Compromise Vulnerability

HIGH
Advisory Identifier: GHSA-5jgq-x857-p8xw
CVSS 7.4
CWE-287
Published
Advisory Summary

CVE-2022-24738 is a HIGH (CVSS 7.4) account compromise vulnerability (CWE-287: Improper Authentication) affecting Github.com/tharsis/evmos libraries in the Go ecosystem. The issue involves account compromise in evmos. Remediation is available by upgrading affected packages to version 2.0.1.

CVE-2022-24738 at a Glance

CVE Identifier CVE-2022-24738
GHSA Identifier GHSA-5jgq-x857-p8xw
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/tharsis/evmos
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.4

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

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

How to Fix CVE-2022-24738

To remediate this vulnerability, upgrade all affected Github.com/tharsis/evmos 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/tharsis/evmos fixed: 2.0.1
Upgrade github.com/tharsis/evmos to 2.0.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 github.com/tharsis/evmos

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-24738, inspect your project dependencies for Github.com/tharsis/evmos:

inspect dependencies for github.com/tharsis/evmos

Analyze the terminal output to locate any version of Github.com/tharsis/evmos in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.1), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/tharsis/evmos, 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?_ ### Classification The vulnerability has been classified as `critical` with a score of `9.0` (highest). It has the potential to affect and drain unclaimed airdrop funds from Cosmos and Osmosis eligible user addresses. ### Disclosure The attack requires advanced knowledge of the internals of the core and application packages of IBC, IBC relayers, the Cosmos SDK `AnteHandler`, and the Evmos `x/claims` module. The step-by-step attack is described below: 1. An actor creates a malicious chain with a custom `AnteHandler` that skips signature verification for transactions, specifically IBC `MsgTransfer`. This allows the attacker to impersonate any account by setting a custom `sender` address field of the IBC transfer message. 2. The malicious actor then connects this newly created chain via IBC to Evmos and fills the `recipient` address from the transfer message with an address they control. 3. Once the IBC packet containing the Transfer data is relayed to Evmos, it is processed by the claims module IBC middleware. Which migrates the claim records to the recipient address, which is owned by the attacker. 4. The attacker then performs two airdrop Actions, claiming up to 75% of the total initial claimable amount. 5. The Actor repeats steps 1., 2., and 3. for every address that has unclaimed funds from the airdrop. This automatically claims 75% of the unclaimable amount. 6. The malicious actor performs the final Action, claiming 100% of all the user funds. 7. Then, the attacker transfers the funds to another chain with a DEX (Osmosis, Cosmos Hub) via IBC. 8. Finally, the attacker withdraws the total amount in fiat through a centralized exchange. ### Users impacted No users have suffered the loss of funds as no malicious chains have been connected to Evmos. ## Patches _Has the problem been patched? What versions should users upgrade to?_ The patch involves defining a list of authorized channels for chains that are connected to Evmos via IBC. This restricts the chains that have the capability of migrating users' claims records as per the specification. By default, the authorized destination channels are `"channel-0"` (Osmosis) and `"channel-3"` (Cosmos Hub). Please upgrade your mainnet node and validator to [`v2.0.1`](https://github.com/tharsis/evmos/releases/tag/v2.0.1) **ASAP**. ## Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ No, the fix for the critical vulnerability is state machine breaking. An upgrade procedure must be coordinated with the nodes running the network. ## References _Are there any links users can visit to find out more?_ * Claims module spec: [evmos.dev/modules/claims](https://evmos.dev/modules/claims) * Cosmos SDK documentation: [docs.cosmos.network](https://docs.cosmos.network/) * IBC documentation: [ibc.cosmos.network](https://ibc.cosmos.network/) ## For more information If you have any questions or comments about this advisory: * Reach out to the Core Team in [Discord](https://discord.gg/evmos) * Open an issue in [tharsis/evmos](http://github.com/tharsis/evmos/issues) * Email us at [security@thars.is](security@thars.is) Thanks to the Core IBC team at Interchain GmbH for the secure disclosure of this vulnerability

CVE-2022-24738 Affected Github.com/tharsis/evmos Versions

1 component(s)
Fixed Versions:
2.0.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/tharsis/evmos
Go
< 2.0.1
2.0.1

References

Frequently Asked Questions

What is CVE-2022-24738?
CVE-2022-24738 is a security vulnerability in Github.com/tharsis/evmos involving Account compromise in Evmos under CWE-287: Improper Authentication.
Which Github.com/tharsis/evmos versions are affected?
Affected versions include releases prior to 2.0.1 across affected packages: github.com/tharsis/evmos.
What version fixes CVE-2022-24738?
Upgrading to 2.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/tharsis/evmos affected?
Yes, github.com/tharsis/evmos is affected in releases prior to 2.0.1. Upgrade your dependency to 2.0.1 or later.
What is the CVSS score of CVE-2022-24738?
CVE-2022-24738 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2022-24738?
CVE-2022-24738 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2022-24738?
Run the dependency tree command: 'inspect dependencies for github.com/tharsis/evmos'. 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-5jgq-x857-p8xw",
  "modified" : "2022-03-18T20:07:34Z",
  "published" : "2022-03-07T21:45:59Z",
  "aliases" : [ "CVE-2022-24738" ],
  "summary" : "Account compromise in Evmos",
  "details" : "## Impact\n_What kind of vulnerability is it? Who is impacted?_\n\n### Classification\n\nThe vulnerability has been classified as `critical` with a score of `9.0` (highest). It has the potential to affect and drain unclaimed airdrop funds from Cosmos and Osmosis eligible user addresses.\n\n### Disclosure\n\nThe attack requires advanced knowledge of the internals of the core and application packages of IBC, IBC relayers, the Cosmos SDK `AnteHandler`,  and the Evmos `x/claims` module. The step-by-step attack is described below:\n\n1. An actor creates a malicious chain with a custom `AnteHandler` that skips signature verification for transactions, specifically IBC `MsgTransfer`. This allows the attacker to impersonate any account by setting a custom `sender` address field of the IBC transfer message.\n2.  The malicious actor then connects this newly created chain via IBC to Evmos and fills the `recipient` address from the transfer message with an address they control.\n3. Once the IBC packet containing the Transfer data is relayed to Evmos, it is processed by the claims module IBC middleware. Which migrates the claim records to the recipient address, which is owned by the attacker.\n4. The attacker then performs two airdrop Actions, claiming up to 75% of the total initial claimable amount.\n5. The Actor repeats steps 1., 2., and 3. for every address that has unclaimed funds from the airdrop. This automatically claims 75% of the unclaimable amount.\n6. The malicious actor performs the final Action, claiming 100% of all the user funds.\n7. Then, the attacker transfers the funds to another chain with a DEX (Osmosis, Cosmos Hub) via IBC. \n8. Finally, the attacker withdraws the total amount in fiat through a centralized exchange. \n\n### Users impacted\n\nNo users have suffered the loss of funds as no malicious chains have been connected to Evmos.\n\n## Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nThe patch involves defining a list of authorized channels for chains that are connected to Evmos via IBC. This restricts the chains that have the capability of migrating users' claims records as per the specification. By default, the authorized destination channels are `\"channel-0\"` (Osmosis) and `\"channel-3\"` (Cosmos Hub).\n\nPlease upgrade your mainnet node and validator to [`v2.0.1`](https://github.com/tharsis/evmos/releases/tag/v2.0.1) **ASAP**.\n\n## Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nNo, the fix for the critical vulnerability is state machine breaking. An upgrade procedure must be coordinated with the nodes running the network.\n\n## References\n\n_Are there any links users can visit to find out more?_\n\n* Claims module spec: [evmos.dev/modules/claims](https://evmos.dev/modules/claims)\n* Cosmos SDK documentation: [docs.cosmos.network](https://docs.cosmos.network/)\n* IBC documentation: [ibc.cosmos.network](https://ibc.cosmos.network/)\n\n## For more information\n\nIf you have any questions or comments about this advisory:\n\n* Reach out to the Core Team in [Discord](https://discord.gg/evmos)\n* Open an issue in [tharsis/evmos](http://github.com/tharsis/evmos/issues)\n* Email us at [security@thars.is](security@thars.is)\n\nThanks to the Core IBC team at Interchain GmbH for the secure disclosure of this vulnerability",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/tharsis/evmos"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tharsis/evmos/security/advisories/GHSA-5jgq-x857-p8xw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24738"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tharsis/evmos/commit/28870258d4ee9f1b8aeef5eba891681f89348f71"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tharsis/evmos"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tharsis/evmos/releases/tag/v2.0.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-07T21:45:59Z",
    "nvd_published_at" : "2022-03-07T22:15:00Z"
  }
}