Skip to content
DoS Audit finding Intermediate

ZETA coin type outbound CCTXs can be sent to unsupported external chains, which results in a DoS of the outbound queue

The code checked whether an external chain supports ZETA by testing if its ZETA token contract address was an empty string, but production configs use the zero address string instead. An attacker could send a ZETA-type cross-chain transaction to a chain that cannot process it, causing the zetaclient to error and blocking the outbound queue for that chain.

berndartmueller Follow

Originally disclosed on Sherlock

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

Found by

berndartmueller

Summary

Checking whether an external chain supports ZETA by checking if the zeta_token_contract_address is set to the empty string ("") is ineffective, as the actual value is set to the string "0x0000000000000000000000000000000000000000".

This allows sending ZETA to external chains that cannot process it and error, blocking subsequent CCTXs.

Root Cause

When processing an inbound CCTX (MsgVoteInbound), in VoteOnInboundBallot()#L58-L60, it prevents outbound CCTX with the ZETA cointype to an external chain that does not have a ZETA token (e.g., Bitcoin, Solana, etc.):

Go
58: if coreParams.ZetaTokenContractAddress == "" && coinType == coin.CoinType_Zeta {
59: 	return false, false, types.ErrInvalidZetaCoinTypes
60: }

Similarly, this check is also done when sending an outbound CCTX from ZEVM to an external chain.

Notice that it checks for the empty string.

Retrieving the current production chain params via https://zetachain.blockpi.network/lcd/v1/public/zeta-chain/observer/get_chain_params, we can see that, for example, the config for Bitcoin (chain id 8332) has zeta_token_contract_address set to the string "0x0000000000000000000000000000000000000000":

JSON
{
  "chain_id": "8332",
  "confirmation_count": "2",
  "gas_price_ticker": "300",
  "inbound_ticker": "20",
  "outbound_ticker": "60",
  "watch_utxo_ticker": "30",
  "zeta_token_contract_address": "0x0000000000000000000000000000000000000000",
  "connector_contract_address": "0x0000000000000000000000000000000000000000",
  "erc20_custody_contract_address": "0x0000000000000000000000000000000000000000",
  "outbound_schedule_interval": "10",
  "outbound_schedule_lookahead": "30",
  "ballot_threshold": "0.660000000000000000",
  "min_observer_delegation": "10000000000000000000.000000000000000000",
  "is_supported": true,
  "gateway_address": "",
  "confirmation_params": {
    "safe_inbound_count": "2",
    "fast_inbound_count": "2",
    "safe_outbound_count": "2",
    "fast_outbound_count": "2"
  },
  "disable_tss_block_scan": false
}

The same applies to other chains, such as Solana (chain ID 900).

This allows sending ZETA to external chains that cannot process it and error, blocking subsequent CCTXs.

Note that there is a specific unit test for this scenario where a CCTX with the ZETA coin type is sent to an unsupported chain -> "fail if inbound contain ZETA but receiver chain doesn't support ZETA" in node/x/observer/keeper/vote_inbound_test.go. However, by setting ZetaTokenContractAddress to the empty string, it will detect that the chain does not support ZETA.

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Send a V1 CCTX with the ZETA coin type to an external chain that does not support it (e.g., Bitcoin, Solana, etc.).
  2. The zetaclient attempts to process the outbound CCTX, but errors when checking the coin type.
  3. The CCTX cannot be processed, the nonce on the external chain is not increased
  4. The CCTX queue is blocked, no further outbound CCTXs can be processed

Impact

Sending outbound CCTX with the cointype ZETA to an external chain that does not support it will cause the CCTX to error in the zetaclient, blocking subsequent CCTXs. It will indefinitely DoS the external chain's outbound CCTX processing.

Note that while such a "stuck" CCTX can be aborted by an admin via MsgAbortStuckCCTX, it will still block the outbound queue because the nonce is still "blocked" (unused).

PoC

We can re-use and update the TestMessagePassingEVMtoZEVM E2E test case to use the Bitcoin chain ID when sending the outbound ZETA CCTX.

Diff
diff --git a/node/e2e/e2etests/legacy/test_message_passing_evm_to_zevm.go b/node/e2e/e2etests/legacy/test_message_passing_evm_to_zevm.go
index a88812581..b0c52a416 100644
--- a/node/e2e/e2etests/legacy/test_message_passing_evm_to_zevm.go
+++ b/node/e2e/e2etests/legacy/test_message_passing_evm_to_zevm.go
@@ -20,8 +20,10 @@ func TestMessagePassingEVMtoZEVM(r *runner.E2ERunner, args []string) {
 	amount := utils.ParseBigInt(r, args[0])

 	// Set destination details
-	zEVMChainID, err := r.ZEVMClient.ChainID(r.Ctx)
-	require.NoError(r, err)
+	// zEVMChainID, err := r.ZEVMClient.ChainID(r.Ctx)
+	// require.NoError(r, err)
+
+	bitcoinChainID := r.GetBitcoinChainID()

 	destinationAddress := r.ZevmTestDAppAddr

@@ -45,7 +47,7 @@ func TestMessagePassingEVMtoZEVM(r *runner.E2ERunner, args []string) {

 	// Call the SendHelloWorld function on the EVM dapp Contract which would in turn create a new send, to be picked up by the zeta-clients
 	// set Do revert to false which adds a message to signal the ZEVM zetaReceiver to not revert the transaction
-	tx, err = testDAppEVM.SendHelloWorld(r.EVMAuth, destinationAddress, zEVMChainID, amount, false)
+	tx, err = testDAppEVM.SendHelloWorld(r.EVMAuth, destinationAddress, big.NewInt(bitcoinChainID), amount, false)
 	require.NoError(r, err)
 	r.Logger.Info("TestDApp.SendHello tx hash: %s", tx.Hash().Hex())

Run the E2E test with:

Bash
make start-localnet
make install-zetae2e
zetae2e run legacy_message_passing_evm_to_zevm --config cmd/zetae2e/config/local.yml --verbose

The Docker logs of one of the zetaclients, specifically, the Bitcoin signer, will error when processing the CCTX due to the invalid ZETA coin type:

Bash
2025-05-11T12:13:56Z ERR failed to setup Bitcoin outbound data error="invalid coin type Zeta" cctx=0x76676ad20454f0ce974f00b092241b48648c41aee26f38a5174bc7981b9de0b9 chain=18444 method=TryProcessOutbound module=signer nonce=0 signer=zeta1erxfztr9nzf72g6jum0vx9p5j23ry6nztz7e2k

Mitigation

Convert ZetaTokenContractAddress to common.Address and then use the already existing IsEmptyAddress() function,

Go
11: // IsEmptyAddress returns true if the address is empty
12: func IsEmptyAddress(address common.Address) bool {
13: 	return address == (common.Address{}) || address.Hex() == constant.EVMZeroAddress
14: }

to check if the ZETA token contract address is set.

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

Root cause

The support check compared the ZETA token contract address against an empty string, while the actual configuration stores the zero address string, so the check never matched.

Impact

Outbound cross-chain transactions for the affected external chain are indefinitely blocked, and aborting the stuck transaction does not free the queue because the nonce remains unused.

What the attacker needed

None

The fix

The ZETA token contract address should be converted to an address type and checked with the existing empty-address helper rather than compared to an empty string.

How it was found

  1. Send a V1 cross-chain transaction with the ZETA coin type to an external chain that does not support it.
  2. The zetaclient tries to process the outbound transaction but errors on the coin type check.
  3. The transaction cannot be processed and the nonce on the external chain is not increased.
  4. The outbound queue is blocked and no further transactions can be processed.

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.

ZetaChain moves tokens between blockchains using cross-chain transactions. The code tried to stop ZETA tokens being sent to chains that do not support them, but it looked for the wrong value when checking the chain's settings. Because of this, someone could send a transaction that the receiving software cannot handle, and that stuck transaction stops all later transactions to that chain from going through.

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.