Skip to content
DoS Audit finding Intermediate

SUI receiver lacks validation

The SUI receiver address in cross-chain withdrawals is not validated, only hex-encoded. An attacker can supply an incorrectly encoded receiver (e.g., 33 bytes instead of 32), causing the zetaclient to repeatedly fail building the withdrawal transaction and block all SUI withdrawals.

0x73696d616f Follow with BrothersInCode and Laksmana

Originally disclosed on Sherlock

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

Found by

0x73696d616f, BrothersInCode, Laksmana

Summary

The SUI receiver is not validated in node/pkg/chains/chain.go, only encoded, leading to the message being stuck when it tries to withdraw in the zetaclient on the SUI chain.

More specifically, an attacker may send a receiver that is incorrectly encoded, such as using 33 bytes instead of 32, and it will keep trying to send the withdrawal in the Zetaclient but failing.

As the nonce is not increased because it errors, it will make all withdrawals stuck. Nodes may be slashed and not get rewards.

Root Cause

In node/pkg/chains/chain.go:95, '"0x" + hex.EncodeToString(b)' lacks validation. https://github.com/sherlock-audit/2025-04-zetachain-cross-chain/blob/main/node/pkg/chains/chain.go#L95

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Attacker calls GatewayZEVM::withdraw() with an incorrect receiver (wrong length, for example).
  2. Zetaclient on SUI gets stuck on this withdrawal as node/zetaclient/chains/sui/signer/signer_tx.go::buildWithdrawTx() errors, returning an error of "unable to create withdrawal tx builder".

Impact

DoSed withdrawals on SUI and loss of rewards for Zetaclient nodes.

PoC

In node/e2e/e2etests/test_sui_withdraw.go::TestSuiWithdraw(), replace "signer.Address()" with some random string that is not a correct SUI address (for example, add 1 byte to signer.address(). Then, run make start-sui-test in the node folder. Observe the logs in the orchestrator and zetaclients, they will be stuck.

Mitigation

Cancel the tx in case of receiver error of revert back to Zetachain to refund.

Discussion

sherlock-admin2

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

gjaldon

The receiver address is now properly validated and any invalid receiver will trigger the cancel transaction broadcasting.

The original report as published on Sherlock, by 0x73696d616f. 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 receiver address is only hex-encoded without validation of its length or format.

Impact

This could cause a denial of service on SUI withdrawals and loss of rewards for Zetaclient nodes.

What the attacker needed

Ability to call GatewayZEVM::withdraw()

The fix

The receiver address is now properly validated and any invalid receiver will trigger the cancel transaction broadcasting.

How it was found

  1. Attacker calls GatewayZEVM::withdraw() with an incorrect receiver (wrong length, for example).
  2. Zetaclient on SUI gets stuck on this withdrawal as buildWithdrawTx() errors, returning an error of "unable to create withdrawal tx builder".

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 cryptocurrency across blockchains, the receiving address must be in the correct format. Here, the system didn't check the address format before trying to use it. An attacker could send a malformed address, and the system would keep trying to process it forever, blocking all other withdrawals on that chain.

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 0x73696d616f

View all

172 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.