Skip to content
DoS Audit finding Intermediate

Solana zetaclient inbound observer is blocked indefinitely when an additional account is passed to the `call` instruction

The Solana zetaclient's inbound parser expected exactly one signer account for the gateway `call` instruction, but the Solana program itself ignores extra accounts. An attacker could send a valid `call` transaction with an additional account, causing the parser to error and the observer to re-scan the same transaction indefinitely, blocking all other inbound Solana transactions.

berndartmueller Follow

Originally disclosed on Sherlock

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

Found by

berndartmueller

Summary

By providing an additional account to the Solana gateway call function, the Solana zetaclient will error, preventing processing other inbound Solana transactions.

Root Cause

The Solana gateway call function expects one account, the signer, to be passed in the instruction.

programs/gateway/src/contexts.rs#L109-L114

Rust
109: #[derive(Accounts)]
110: pub struct Call<'info> {
111:     /// The account of the signer making the call.
112:     #[account(mut)]
113:     pub signer: Signer<'info>,
114: }

Additional accounts can be passed by the user, they will just be ignored by the program.

However, the Solana zetaclient expects the instruction to have exactly one signer account. If there is more than one signer account, it errors out with the message want only 1 signer account, got %d.

pkg/contracts/solana/inbound.go#L264-L266

Go
238: func ParseInboundAsCall(
239: 	tx *solana.Transaction,
240: 	instructionIndex int,
241: 	slot uint64,
242: ) (*Inbound, error) {
...   // [...]
257:
258: 	// get the sender address (skip if unable to parse signer address)
259: 	instructionAccounts, err := instruction.ResolveInstructionAccounts(&tx.Message)
260: 	if err != nil {
261: 		return nil, err
262: 	}
263:
264: 	if len(instructionAccounts) != 1 {
265: 		return nil, fmt.Errorf("want only 1 signer account, got %d", len(instructionAccounts))
266: 	}

This error is propagated up to the FilterInboundEventsAndVote function, which is called in the ObserveInbound function.

zetaclient/chains/solana/observer/inbound.go#L88-L92

Go
88: // filter inbound events and vote
89: if err = ob.FilterInboundEventsAndVote(ctx, txResult); err != nil {
90: 	// we have to re-scan this signature on next ticker
91: 	return errors.Wrapf(err, "error FilterInboundEventAndVote for sig %s", sigString)
92: }

Due to this error, the same transaction will be re-scanned on the next ticker, preventing other inbound Solana transactions from being processed indefinitely.

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. The attacker sends a Solana transaction with the call instruction to the Solana gateway program with an additional account.
  2. The Solana transaction is executed, and the call instruction is processed successfully.
  3. The Solana zetaclient processes the transaction and calls the ParseInboundAsCall function. The check len(instructionAccounts) != 1 fails, as there are two accounts passed in the instruction.
  4. The error is propagated up to the ObserveInbound function, which re-scans the same transaction on the next ticker.
  5. The error is surfaced repeatedly, preventing any other inbound Solana transactions from being processed.

Impact

The Solana inbound processing is blocked indefinitely, preventing any other inbound Solana transactions from being processed.

PoC

To demonstrate how an additional account breaks this check, we can run theTestSolanaToZEVMCall E2E test case. This test case calls the Solana gateway's call function with an additional account.

Update the CreateSOLCallInstruction function to add an additional account to the instruction:

Diff
return &solana.GenericInstruction{
		ProgID:    r.GatewayProgram,
		DataBytes: callData,
		AccountValues: []*solana.AccountMeta{
			solana.Meta(signer).WRITE().SIGNER(),
+			solana.Meta(solana.SystemProgramID),
		},
	}

Run the test case with the following command:

Bash
make start-solana-test

After a while, when the E2E test is running, you will see the following error in the Docker logs of the zetaclient (both, 1 and 2):

Bash
2025-05-07T12:21:46Z INF got wrong amount of signatures chain=902 chain_network=solana method=ObserveInbound module=inbound signatures=1

2025-05-07T12:21:46Z ERR task failed error="error FilterInboundEventAndVote for sig 2f4P2EAtrh7HitBEU4ZzvPCw72PcAR5EjqPqfTaqi5oyvFiY8zUwNdnvK9mxWN3kumEpnWWXCasbiNhPNkTD3cj: error FilterInboundEvent: error ParseInboundAsCall: want only 1 signer account, got 2" module=scheduler task.group=sol:902 task.name=observe_inbound task.type=interval_ticker

The error will be logged repeatedly as the zetaclients re-scan this same transaction. Any other inbound Solana transaction will not be processed.

Mitigation

Like other instances in the Solana zetaclient, the check for the number of accounts should use < 1 instead of != 1. This will allow the program to process the transaction successfully, even if additional accounts are passed in the instruction.

Go
264: 	if len(instructionAccounts) < 1 {
265: 		return nil, fmt.Errorf("want required 1 signer account, got %d", len(instructionAccounts))
266: 	}

Discussion

sherlock-admin2

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

gjaldon

The issue is fixed by changing the check to less than the accountsNumberCall so that more instruction accounts can be passed.

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 zetaclient parser enforced an exact account count (`!= 1`) while the Solana program accepted and ignored additional accounts, so a valid transaction could break the parser.

What the attacker needed

Ability to send a Solana transaction to the gateway

How it was found

  1. Send a Solana transaction with the `call` instruction to the gateway program, including an additional account.
  2. The Solana program executes the `call` instruction successfully, ignoring the extra account.
  3. The zetaclient parses the transaction and fails the check that requires exactly one account.
  4. The error propagates to the inbound observer, which re-scans the same transaction on the next ticker.
  5. The error repeats, preventing any other inbound Solana transactions from being 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.

A cross-chain client watches Solana transactions to process them. It assumed a certain transaction would always have exactly one account attached, but the Solana program allowed extra accounts. By sending a transaction with an extra account, an attacker made the client crash on that transaction and get stuck retrying it forever, so no other transactions could be handled.

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.