// For flags

CVE-2024-32644

Evmos' transaction execution not accounting for all state transition after interaction with precompiles

Severity Score

9.1
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Attend
*SSVC
Descriptions

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.

Evmos es una cadena de bloques EVM de prueba de participación escalable y de alto rendimiento que es totalmente compatible e interoperable con Ethereum. Antes de 17.0.0, había una manera de acuñar tokens arbitrarios debido a la posibilidad de tener dos estados diferentes no sincronizados durante la ejecución de una transacción. El exploit se basa en el hecho de que para sincronizar el estado del SDK de Cosmos y el de EVM, confiamos en el método `stateDB.Commit()`. Cuando llamamos a este método, iteramos por todo el `dirtyStorage` y, **si y solo si** es diferente del `originStorage`, configuramos el nuevo estado. Establecer el nuevo estado significa que actualizamos Cosmos SDK KVStore. Si el estado de almacenamiento de un contrato es el mismo antes y después de una transacción, pero se cambia durante la transacción y puede llamar a un contrato externo después del cambio, se puede explotar para hacer que la transacción sea similar a no atómica. La vulnerabilidad es **crítica** ya que podría provocar una fuga de fondos a través de interacciones creativas del SC. El problema se solucionó en las versiones >=V17.0.0.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Attend
Exploitation
None
Automatable
Yes
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2024-04-16 CVE Reserved
  • 2024-04-19 CVE Published
  • 2024-04-20 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-662: Improper Synchronization
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Evmos
Search vendor "Evmos"
Evmos
Search vendor "Evmos" for product "Evmos"
< 17.0.0
Search vendor "Evmos" for product "Evmos" and version " < 17.0.0"
en
Affected