CVE-2021-43839: Github.com/crypto org chain/cronos Drainage Of FeeCollector's Block Transaction Vulnerability

HIGH
Advisory Identifier: GHSA-f854-hpxv-cw9r
CVSS 7.5
CWE-670
Published
Advisory Summary

CVE-2021-43839 is a HIGH (CVSS 7.5) drainage of feecollector's block transaction vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting Github.com/crypto org chain/cronos libraries in the Go ecosystem. The issue involves drainage of feecollector's block transaction fees in cronos. Remediation is available by upgrading affected packages to version 0.6.5, 0.10.0, 0.7.3.

CVE-2021-43839 at a Glance

CVE Identifier CVE-2021-43839
GHSA Identifier GHSA-f854-hpxv-cw9r
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-670: Always-Incorrect Control Flow Implementation
Affected Product Github.com/crypto org chain/cronos
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

How to Fix CVE-2021-43839

To remediate this vulnerability, upgrade all affected Github.com/crypto org chain/cronos 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/crypto-org-chain/cronos fixed: 0.6.5
Upgrade github.com/crypto-org-chain/cronos to 0.6.5
github.com/tharsis/ethermint fixed: 0.10.0
Upgrade github.com/tharsis/ethermint to 0.10.0
github.com/tharsis/evmos fixed: Latest secure release
Upgrade github.com/tharsis/evmos to Latest secure release
github.com/tharsis/ethermint fixed: 0.7.3
Upgrade github.com/tharsis/ethermint to 0.7.3
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/crypto-org-chain/cronos

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-43839, inspect your project dependencies for Github.com/crypto org chain/cronos:

inspect dependencies for github.com/crypto-org-chain/cronos

Analyze the terminal output to locate any version of Github.com/crypto org chain/cronos in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.5), 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-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. In Github.com/crypto org chain/cronos, 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 In Cronos nodes running versions before v0.6.5, it is possible to take transaction fees from Cosmos SDK's FeeCollector for the current block by sending a custom crafted MsgEthereumTx. User funds and balances are safe. ### Patches This problem has been patched in Cronos v0.6.5 on the mempool level. The next network upgrade with consensus-breaking changes will patch it on the consensus level. ### Workarounds There are no tested workarounds. All validator node operators are recommended to upgrade to Cronos v0.6.5 at their earliest possible convenience. ### Credits Thank you to @zb3 for reporting this issue on [Cronos Immunefi Bug Bounty Program](https://immunefi.com/bounty/cronos/), to @cyril-crypto for reproducing the issue and to @yihuang and @thomas-nguy for patching the issue on the CheckTx (mempool) and the DeliverTx (consensus) levels. ### For more information If you have any questions or comments about this advisory: * Open a discussion in [crypto-org-chain/cronos](https://github.com/crypto-org-chain/cronos/discussions/new) * Email us at [chain@crypto.org](mailto:chain@crypto.org)

CVE-2021-43839 Affected Github.com/crypto org chain/cronos Versions

4 component(s)
Fixed Versions:
0.6.50.10.00.7.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/crypto-org-chain/cronos
Go
< 0.6.5
0.6.5
github.com/tharsis/ethermint
Go
≥ 0.8.0
< 0.10.0
0.10.0
github.com/tharsis/evmos
Go
≤ 0.4.2
github.com/tharsis/ethermint
Go
< 0.7.3
0.7.3

References

Frequently Asked Questions

What is CVE-2021-43839?
CVE-2021-43839 is a security vulnerability in Github.com/crypto org chain/cronos involving Drainage of FeeCollector's Block Transaction Fees in cronos under CWE-670: Always-Incorrect Control Flow Implementation.
Which Github.com/crypto org chain/cronos versions are affected?
Affected versions include releases prior to 0.6.5, 0.10.0, 0.7.3 across affected packages: github.com/crypto-org-chain/cronos, github.com/tharsis/ethermint, github.com/tharsis/evmos.
What version fixes CVE-2021-43839?
Upgrading to 0.6.5, 0.10.0, 0.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/crypto-org-chain/cronos affected?
Yes, github.com/crypto-org-chain/cronos is affected in releases prior to 0.6.5. Upgrade your dependency to 0.6.5 or later.
Is github.com/tharsis/ethermint affected?
Yes, github.com/tharsis/ethermint is affected in releases prior to 0.10.0, 0.7.3. Upgrade your dependency to 0.10.0, 0.7.3 or later.
What is the CVSS score of CVE-2021-43839?
CVE-2021-43839 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2021-43839?
CVE-2021-43839 is classified under CWE-670: Always-Incorrect Control Flow Implementation (The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.).
How can I check Go dependencies for CVE-2021-43839?
Run the dependency tree command: 'inspect dependencies for github.com/crypto-org-chain/cronos'. 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-f854-hpxv-cw9r",
  "modified" : "2022-01-06T20:21:28Z",
  "published" : "2022-01-06T18:30:54Z",
  "aliases" : [ "CVE-2021-43839" ],
  "summary" : "Drainage of FeeCollector's Block Transaction Fees in cronos",
  "details" : "### Impact\nIn Cronos nodes running versions before v0.6.5, it is possible to take transaction fees from Cosmos SDK's FeeCollector for the current block by sending a custom crafted MsgEthereumTx.\n\nUser funds and balances are safe.\n\n\n### Patches\nThis problem has been patched in Cronos v0.6.5 on the mempool level.\nThe next network upgrade with consensus-breaking changes will patch it on the consensus level.\n\n### Workarounds\nThere are no tested workarounds. All validator node operators are recommended to upgrade to Cronos v0.6.5 at their earliest possible convenience.\n\n### Credits\nThank you to @zb3 for reporting this issue on [Cronos Immunefi Bug Bounty Program](https://immunefi.com/bounty/cronos/), to @cyril-crypto for reproducing the issue and to @yihuang and @thomas-nguy for patching the issue on the CheckTx (mempool) and the DeliverTx (consensus) levels.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a discussion in [crypto-org-chain/cronos](https://github.com/crypto-org-chain/cronos/discussions/new)\n* Email us at [chain@crypto.org](mailto:chain@crypto.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/crypto-org-chain/cronos"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/tharsis/ethermint"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.0"
      }, {
        "fixed" : "0.10.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/tharsis/evmos"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/tharsis/ethermint"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.7.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/crypto-org-chain/cronos/security/advisories/GHSA-f854-hpxv-cw9r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43839"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crypto-org-chain/cronos/pull/270"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crypto-org-chain/cronos/commit/150ef237b37ac28c8136e1c0f494932860b9ebe8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crypto-org-chain/cronos"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-670" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-04T22:40:01Z",
    "nvd_published_at" : "2021-12-21T17:15:00Z"
  }
}