CVE-2022-35936Ethermint DoS through Unintended Contract Selfdestruct
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.
What to do
Fixed builds are available from Go: see the table below for the fixed version per release.
Go has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Go library | github.com/Kava-Labs/kava | Fixed | 0.18.0 | GHSA-f92v-grc2-w2fg |
| Go library | github.com/crypto-org-chain/cronos | Fixed | 0.7.1-rc2 | GHSA-f92v-grc2-w2fg |
| Go library | github.com/evmos/ethermint | Fixed | 0.18.0 | GHSA-f92v-grc2-w2fg |
| Go library | github.com/evmos/evmos | Fixed | 7.0.0 | GO-2022-0760 |
| Go library | github.com/evmos/evmos/v2 | Fix pending | GO-2022-0760 | |
| Go library | github.com/evmos/evmos/v3 | Fix pending | GO-2022-0760 | |
| Go library | github.com/evmos/evmos/v4 | Fix pending | GO-2022-0760 | |
| Go library | github.com/evmos/evmos/v5 | Fix pending | GO-2022-0760 | |
| Go library | github.com/evmos/evmos/v6 | Fix pending | GO-2022-0760 | |
| Go library | github.com/evmos/evmos/v7 | Fixed | 7.0.0 | GO-2022-0760 |
| Go library | github.com/kava-labs/kava | Fixed | 0.18.0 | GO-2022-0760 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- evmos ethermint: affected: <= 0.17.2
References
- https://github.com/evmos/ethermint/security/advisories/GHSA-f92v-grc2-w2fg
- https://github.com/evmos/ethermint/commit/144741832007a26dbe950512acbda4ed95b2a451
- https://github.com/evmos/ethermint/blob/c9d42d667b753147977a725e98ed116c933c76cb/x/evm/keeper/statedb.go#L199-L203
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.