CVE-2024-32644 Evmos' transaction execution not accounting for all state transition after interaction with precompiles

Critical 9.1 Published Updated

Attackers can mint arbitrary tokens or drain funds by exploiting state synchronization flaws between Cosmos SDK and EVM during transaction execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-32644?

CVE-2024-32644 is a critical vulnerability in evmos, published on 19 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Evmos is a scalable, high-throughput Proof-of-Stake EVM blockchain that is fully compatible and interoperable with Ethereum. Prior to 17.0.0, there is a way to mint arbitrary tokens due to the possibility to have two different states not in sync during the execution of a transaction. The exploit is based on the fact that to sync the Cosmos SDK state and the EVM one, we rely on the `stateDB.Commit()` method. When we call this method, we iterate though all the `dirtyStorage` and, **if and only if** it is different than the `originStorage`, we set the new state. Setting the new state means we update the Cosmos SDK KVStore. If a contract storage state that is the same before and after a transaction, but is changed during the transaction and can call an external contract after the change, it can be exploited to make the transaction similar to non-atomic. The vulnerability is **critical** since this could lead to drain of funds through creative SC interactions. The issue has been patched in versions >=V17.0.0.

Weakness: CWE-662

Which versions are affected by CVE-2024-32644?

40 open source packages ship an affected version, including github.com/evmos/evmos/v16, github.com/evmos/evmos and github.com/evmos/evmos/v10. It affects 1 product.

PackageAffectedFixed in
github.com/evmos/evmos/v16 GoAll versionsNone
github.com/evmos/evmos/v16 GoAll versions17.0.0
github.com/evmos/evmos/v16 GoAll versions17.0.0
github.com/evmos/evmos GoAll versionsNone
github.com/evmos/evmos/v10 GoAll versionsNone
github.com/evmos/evmos/v11 GoAll versionsNone
34 more packages
github.com/evmos/evmos/v12 GoAll versionsNone
github.com/evmos/evmos/v13 GoAll versionsNone
github.com/evmos/evmos/v14 GoAll versionsNone
github.com/evmos/evmos/v15 GoAll versionsNone
github.com/evmos/evmos/v17 GoAll versions17.0.0
github.com/evmos/evmos/v2 GoAll versionsNone
github.com/evmos/evmos/v3 GoAll versionsNone
github.com/evmos/evmos/v4 GoAll versionsNone
github.com/evmos/evmos/v5 GoAll versionsNone
github.com/evmos/evmos/v5 GoAll versions to 5.0.0None
github.com/evmos/evmos/v5 GoAll versions to 5.0.0None
github.com/evmos/evmos/v6 GoAll versionsNone
github.com/evmos/evmos/v6 GoAll versions to 6.0.4None
github.com/evmos/evmos/v6 GoAll versions to 6.0.4None
github.com/evmos/evmos/v7 GoAll versionsNone
github.com/evmos/evmos/v7 GoAll versions to 7.0.0None
github.com/evmos/evmos/v7 GoAll versions to 7.0.0None
github.com/evmos/evmos/v8 GoAll versionsNone
github.com/evmos/evmos/v9 GoAll versionsNone
github.com/tharsis/evmos GoAll versionsNone
github.com/tharsis/evmos GoAll versions to 1.1.3None
github.com/tharsis/evmos GoAll versions to 1.1.3None
github.com/tharsis/evmos/v2 GoAll versionsNone
github.com/tharsis/evmos/v2 GoAll versions to 2.0.2None
github.com/tharsis/evmos/v2 GoAll versions to 2.0.2None
github.com/tharsis/evmos/v3 GoAll versionsNone
github.com/tharsis/evmos/v3 GoAll versions to 3.0.3None
github.com/tharsis/evmos/v3 GoAll versions to 3.0.3None
github.com/tharsis/evmos/v4 GoAll versionsNone
github.com/tharsis/evmos/v4 GoAll versions to 4.0.2None
github.com/tharsis/evmos/v4 GoAll versions to 4.0.2None
github.com/tharsis/evmos/v5 GoAll versionsNone
github.com/tharsis/evmos/v5 GoAll versions to 5.0.1None
github.com/tharsis/evmos/v5 GoAll versions to 5.0.1None

Products include Evmos Evmos.

How do I fix CVE-2024-32644?

Upgrade github.com/evmos/evmos/v16 to 17.0.0 or later.

Is CVE-2024-32644 being exploited?

There is no known exploitation of CVE-2024-32644 in the wild and no public exploit code.

Sources

Also known as GHSA-3fp5-2xwh-fxm6, GO-2024-2715.

Is CVE-2024-32644 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free