Vulnerability · Published Aug 5, 2022 · Assigned by GitHub_M

CVE-2022-35936Ethermint DoS through Unintended Contract Selfdestruct

High 8.2

In plain English

A high-severity security flaw in ethermint from evmos. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.2High
Exploit odds (30 days)1.5%top 26.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Ethermint is an Ethereum library. In Ethermint running versions before `v0.17.2`, the contract `selfdestruct` invocation permanently removes the corresponding bytecode from the internal database storage. However, due to a bug in the `DeleteAccount`function, all contracts that used the identical bytecode (i.e shared the same `CodeHash`) will also stop working once one contract invokes `selfdestruct`, even though the other contracts did not invoke the `selfdestruct` OPCODE. This vulnerability has been patched in Ethermint version v0.18.0. The patch has state machine-breaking changes for applications using Ethermint, so a coordinated upgrade procedure is required. A workaround is available. If a contract is subject to DoS due to this issue, the user can redeploy the same contract, i.e. with identical bytecode, so that the original contract's code is recovered. The new contract deployment restores the `bytecode hash -> bytecode` entry in the internal state.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/Kava-Labs/kava0.18.0GHSA-f92v-grc2-w2fg
Gogithub.com/crypto-org-chain/cronos0.7.1-rc2GHSA-f92v-grc2-w2fg
Gogithub.com/crypto-org-chain/cronos0.7.1-rc2GO-2022-0760
Gogithub.com/evmos/ethermint0.18.0GHSA-f92v-grc2-w2fg
Gogithub.com/evmos/ethermint0.18.0GO-2022-0760
Gogithub.com/evmos/evmos7.0.0GHSA-f92v-grc2-w2fg
Gogithub.com/evmos/evmosno fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v2no fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v3no fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v4no fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v5no fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v6no fix listedGO-2022-0760
Gogithub.com/evmos/evmos/v77.0.0GO-2022-0760
Gogithub.com/kava-labs/kava0.18.0GO-2022-0760

Affected products (as reported)

VendorProductVersions
evmos ethermint <= 0.17.2

Weakness: CWE-668 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

References