# CVE-2022-35936: Ethermint DoS through Unintended Contract Selfdestruct

> Attackers can cause denial of service for multiple contracts sharing bytecode by triggering selfdestruct on one, affecting Ethermint users.

- **Severity:** High 8.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Aug 2022
- **Updated:** 22 Apr 2025
- **Also known as:** GHSA-f92v-grc2-w2fg, GO-2022-0760

## What is CVE-2022-35936?

CVE-2022-35936 is a high-severity denial of service vulnerability in evmos ethermint, published on 5 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### 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.

Weakness: CWE-668 (Exposure of Resource to Wrong Sphere)

## Which versions are affected by CVE-2022-35936?

18 open source packages ship an affected version, including github.com/evmos/ethermint, github.com/Kava-Labs/kava and github.com/crypto-org-chain/cronos. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/evmos/ethermint` | Go | All versions | 0.18.0 |
| `github.com/evmos/ethermint` | Go | All versions | 0.18.0 |
| `github.com/evmos/ethermint` | Go | All versions | 0.18.0 |
| `github.com/Kava-Labs/kava` | Go | All versions | 0.18.0 |
| `github.com/Kava-Labs/kava` | Go | All versions | 0.18.0 |
| `github.com/crypto-org-chain/cronos` | Go | All versions | 0.7.1-rc2 |
| `github.com/crypto-org-chain/cronos` | Go | All versions | 0.7.1-rc2 |
| `github.com/crypto-org-chain/cronos` | Go | All versions | 0.7.1-rc2 |
| `github.com/evmos/evmos` | Go | All versions | None |
| `github.com/evmos/evmos` | Go | All versions | 7.0.0 |
| `github.com/evmos/evmos` | Go | All versions | 7.0.0 |
| `github.com/evmos/evmos/v2` | Go | All versions | None |
| `github.com/evmos/evmos/v3` | Go | All versions | None |
| `github.com/evmos/evmos/v4` | Go | All versions | None |
| `github.com/evmos/evmos/v5` | Go | All versions | None |
| `github.com/evmos/evmos/v6` | Go | All versions | None |
| `github.com/evmos/evmos/v7` | Go | All versions | 7.0.0 |
| `github.com/kava-labs/kava` | Go | All versions | 0.18.0 |

Products: Crypto Cronos, Evmos Ethermint, Evmos Evmos, Kava Kava.

## How do I fix CVE-2022-35936?

Upgrade github.com/evmos/ethermint to 0.18.0 or later.

## Is CVE-2022-35936 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-35936 exists.

## Other vulnerabilities in evmos ethermint

- [CVE-2021-43839](https://insights.sbomify.com/CVE-2021-43839/): Drainage of FeeCollector's Block Transaction Fees (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-35936 and fix it if it is affected.

What it is: CVE-2022-35936 is a high-severity denial of service vulnerability in evmos ethermint, published on 5 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-35936 exists.

Affected packages and fixed versions:
- github.com/evmos/ethermint (Go): affected all versions; fixed in 0.18.0
- github.com/evmos/ethermint (Go): affected all versions; fixed in 0.18.0
- github.com/evmos/ethermint (Go): affected all versions; fixed in 0.18.0
- github.com/Kava-Labs/kava (Go): affected all versions; fixed in 0.18.0
- github.com/Kava-Labs/kava (Go): affected all versions; fixed in 0.18.0
- github.com/crypto-org-chain/cronos (Go): affected all versions; fixed in 0.7.1-rc2
- github.com/crypto-org-chain/cronos (Go): affected all versions; fixed in 0.7.1-rc2
- github.com/crypto-org-chain/cronos (Go): affected all versions; fixed in 0.7.1-rc2
- github.com/evmos/evmos (Go): affected all versions; no fix listed
- github.com/evmos/evmos (Go): affected all versions; fixed in 7.0.0
- github.com/evmos/evmos (Go): affected all versions; fixed in 7.0.0
- github.com/evmos/evmos/v2 (Go): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-35936/ (Markdown: https://insights.sbomify.com/CVE-2022-35936/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-35936
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-35936
- OSV: https://osv.dev/vulnerability/CVE-2022-35936

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-35936/
Summaries are generated and may contain mistakes; the official description above is the record.
