Evmos transaction execution not accounting for all state transition after interaction with precompiles
stateObject](https://github.com/evmos/evmos/blob/b196a522ba4951890b40992e9f97aa610f8b5f9c/x/evm/statedb/state_object.go#L53-L68): represents the state of an account and is used to store its updates during a state transition. This is accomplished using two in memory Storage variables: originStorage and dirtyStorageStateDB](https://github.com/evmos/evmos/blob/b196a522ba4951890b40992e9f97aa610f8b5f9c/x/evm/statedb/statedb.go#L33-L55): it is the general interface to retrieve accounts and holds a map of stateObjects.An external contributor, @iczc, discovered 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](https://github.com/evmos/evmos/blob/b196a522ba4951890b40992e9f97aa610f8b5f9c/x/evm/statedb/statedb.go#L460-L465). Setting the new state means we update the Cosmos SDK KVStore.
Below, are described the steps to perform the attack:
originStorage.If the tx is executed correctly, this is what happens at the store level:
dirtyStorage is committed to the KVStore without changing the originStorage.dirtyStorage, it is updated to the previous value A without changing the originStorage.Since the tx executed correctly, the evm calls the commit to persist the dirtyStorage. However, since dirtyStorage is equal to originStorage, nothing will be changed.
To summarize, 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.
Based on [ImmuneFi Severity Classification System](https://immunefisupport.zendesk.com/hc/en-us/articles/13332717597585-Severity-Classification-System) the severity was evaluated to Critical since the attack could have lead to direct loss of funds.
The issue has been patched in versions >=V17.0.0.
If you have any questions or comments about this advisory:
Reach out to the Core Team in [Discord](https://discord.gg/evmos)
Open a discussion in [evmos/evmos](https://github.com/evmos/evmos/discussions)
Email us at [security@evmos.org](mailto:[email protected]) for security questions
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability high.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVE-2024-32644 is classified as CWE-662: Improper Synchronization. The product utilizes multiple threads, processes, components, or systems to allow temporary access to a shared resource that can only be exclusive to one process at a time, but it does not properly synchronize these actions, which might cause…
CVE-2024-32644 is recorded against 23 packages.
Published on 19 April 2024 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
github.com
github.com
github.com
github.com
github.com
github.com
evmos has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-662: Improper Synchronization) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| evmos | — | 17.0.0 |
| github.com/evmos/evmos | — | — |
| github.com/evmos/evmos/v10 | — | — |
| github.com/evmos/evmos/v11 | — | — |
| github.com/evmos/evmos/v12 | — | — |
| github.com/evmos/evmos/v13 | — | — |
| github.com/evmos/evmos/v14 | — | — |
| github.com/evmos/evmos/v15 | — | — |
| github.com/evmos/evmos/v16 | — | — |
| github.com/evmos/evmos/v17 | — | — |
| github.com/evmos/evmos/v2 | — | — |
| github.com/evmos/evmos/v3 | — | — |
| github.com/evmos/evmos/v4 | — | — |
| github.com/evmos/evmos/v5 | — | — |
| github.com/evmos/evmos/v6 | — | — |
| github.com/evmos/evmos/v7 | — | — |
| github.com/evmos/evmos/v8 | — | — |
| github.com/evmos/evmos/v9 | — | — |
| github.com/tharsis/evmos | — | — |
| github.com/tharsis/evmos/v2 | — | — |
| github.com/tharsis/evmos/v3 | — | — |
| github.com/tharsis/evmos/v4 | — | — |
| github.com/tharsis/evmos/v5 | — | — |
References
Similar Threats
Exploit Protection
CVE-2024-32644 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2024-32644 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.