Skip to content
DoS Audit finding Intermediate

EVM outbound transaction gas limit can be set lower than the intrinsic gas limit, which prevents sending the transaction and blocks all other outbound transactions to this chain

The gas limit for an outbound EVM transaction could be set below the intrinsic gas limit, causing the transaction to fail broadcasting and blocking all subsequent outbound transactions to that chain. An attacker could exploit this to cause a denial of service.

berndartmueller Follow with g

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/324

Found by

berndartmueller, g

Summary

The gas limit for an outbound EVM (e.g., Ethereum) transaction can be set lower than the intrinsic gas limit of the EVM (min. ~21k, growing based on transaction size). This prevents sending the transaction, blocking the nonce, and causing a Denial of Service (DoS) for all subsequent outbound transactions to the EVM chain.

Root Cause

In gasFromCCTX(), a recent PR #3680 removed the limit < minGasLimit check for a lower bound gas limit, to ensure an EVM outbound transaction never has less than 100k gas.

Now, it only enforces a maximum gas limit, and overwrites the gas limit if it is set to 21k.

gasFromCCTX()#L74-L91

Go
74: if limit > maxGasLimit {
75: 	limit = maxGasLimit
76: 	logger.Warn().
77: 		Uint64("cctx.initial_gas_limit", params.CallOptions.GasLimit).
78: 		Uint64("cctx.gas_limit", limit).
79: 		Msgf("Gas limit is too high; Setting to the maximum (%d)", maxGasLimit)
80: } else if limit == gasTransferGasLimit && (params.CoinType != coin.CoinType_Gas || (cctx.IsCurrentOutboundRevert() && cctx.RevertOptions.CallOnRevert)) {
81: 	// in some context, 21k might currently be used for an outbound that involves a contract call
82: 	// this includes erc20 withdraw and onRevert calls whe gas deposit revert
83: 	// we fix this minimum to ensure the transaction has the minimum required gas limit
84: 	// TODO: fix the gas limit used for these cctx outbound gas limit
85: 	// https://github.com/zeta-chain/node/issues/3723
86: 	limit = contractCallMinGasLimit
87: 	logger.Warn().
88: 		Uint64("cctx.initial_gas_limit", params.CallOptions.GasLimit).
89: 		Uint64("cctx.gas_limit", limit).
90: 		Msgf("Gas limit is too low for contract call; Setting to the minimum (%d)", contractCallMinGasLimit)
91: }

This means that the gas limit can be set to a very low value, so that the Ethereum RPC intrinsic gas error is returned. As a result, broadcasting the outbound EVM transaction with BroadcastOutbound() will fail repeatedly. As this does not increase the nonce, any subsequent outbound transactions cannot be sent.

This is non-recoverable, even trying to abort this "stuck" CCTX will not work as the nonce will not be re-used by another CCTX.

For further details, please see the same issue in the Code4rena ZetaChain contest:

Outbound transactions that can not be broadcasted to an external EVM chain cause a Denial of Service of all outgoing transactions to this chain

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Attacker sends an outbound CCTX from ZetaChain to Ethereum and sets the gas limit to a very low value (e.g., 1337).
  2. The EVM zetaclients processes the CCTX and uses 1337 as the transaction gas limit
  3. Broadcasting the Ethereum transaction fails with the intrinsic gas error
  4. Zetaclient retries a couple of times, without success
  5. The CCTX is stuck in the outbound queue, and the TSS nonce on Ethereum is not incremented
  6. Subsequent outbound CCTXs to Ethereum are stuck in the outbound queue

Impact

The EVM outbound zetaclient queue will be stuck as the CCTX with the next expected nonce will never be sent and executed. Subsequent CCTXs will be stuck in the queue, representing a DoS.

PoC

N/A

Mitigation

Consider re-adding the minimum gas limit check.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/zeta-chain/node/pull/3848

gjaldon

If the gas limit is less than 100,000 for any EVM CCTX with contract calls, the gas is set to 100,000 to ensure that there is enough gas to broadcast the transaction and prevent CCTXs from getting blocked.

The original report as published on Sherlock, by berndartmueller. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

The EVM outbound zetaclient queue will be stuck as the CCTX with the next expected nonce will never be sent and executed, causing a denial of service for all subsequent outbound transactions to that chain.

What the attacker needed

Ability to send a cross-chain transaction

The fix

The protocol team fixed this issue by re-adding a minimum gas limit check, ensuring that for any EVM CCTX with contract calls, the gas is set to at least 100,000.

How it was found

  1. Attacker sends an outbound CCTX from ZetaChain to Ethereum and sets the gas limit to a very low value (e.g., 1337).
  2. The EVM zetaclients processes the CCTX and uses 1337 as the transaction gas limit
  3. Broadcasting the Ethereum transaction fails with the intrinsic gas error
  4. Zetaclient retries a couple of times, without success
  5. The CCTX is stuck in the outbound queue, and the TSS nonce on Ethereum is not incremented
  6. Subsequent outbound CCTXs to Ethereum are stuck in the outbound queue

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you send a transaction on a blockchain like Ethereum, you must specify a gas limit, which is the maximum amount of gas the transaction can use. If this limit is set too low, the transaction is rejected by the network. In this case, an attacker could set a very low gas limit for a cross-chain transaction, causing it to fail and get stuck. Because the failed transaction never gets processed, it blocks all later transactions from the same sender, like a traffic jam.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by berndartmueller

View all

97 more disclosed reports, best first.

More from ZetaChain Cross-Chain

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.