Skip to content

DOS and transaction fee expropiation through Authz exploit

Critical
facs95 published GHSA-v6rw-hhgg-wc4x Apr 17, 2024

Package

gomod github.com/evmos/evmos (Go)

Affected versions

< 11.0.1

Patched versions

>= 12.0.0

Description

Impact

What kind of vulnerability is it? Who is impacted?

An attacker can use this bug to bypass the block gas limit and gas payment completely to perform a full Denial-of-Service against the chain.

Disclosure

Evmos versions below v11.0.1 do not check for MsgEthereumTx messages that are nested under other messages. This allows a malicious actor to perform EVM transactions that do not meet the checks performed under newEthAnteHandler. This opens the possibility for the DOS of validators and consequently halt the chain through an infinite EVM execution.

Additional details

The attack scenario is as follows:

  1. The attacker deploys a simple smart contract with an infinite loop to the chain.
  2. The attacker calls the smart contract using an embedded transaction with an extremely high gas value (uint64 max or similar).
  3. Once the transaction is included in a block, nodes will try to execute the EVM transaction with almost infinite gas and get stuck. This stops new block creation and effectively halts the chain, requiring a manual restart of all nodes.

Users Impacted

All Evmos users are impacted by this vulnerability as it has the potential to halt the chain. Users' funds and chain state are safe but when under attack, the chain could be deemed unusable.

Patches

Has the problem been patched? What versions should users upgrade to?

The vulnerability has been patched on Evmos versions ≥v12.0.0.

Details

As a temporary workaround, the fix blocks MsgEthereumTxs messages from being sent under the authz module's MsgExec message. It also covers the scenario in which MsgEthereumTx are deeply nested by:

  • Doing a recursive check over the nested messages of MsgExec
  • Limiting the amount of possible nested messages (inner messages) in MsgExec

This is done by adding an additional AnteHandler decorator (AuthzLimiterDecorator) for Cosmos and EIP-712 transactions.

This is a state machine-breaking change as it restricts previously allowed messages and thus requires a hard-fork upgrade.

References

Are there any links users can visit to find out more?

For more information

If you have any questions or comments about this advisory:

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

CVE ID

No known CVE

Weaknesses

No CWEs