Skip to content
Business logic Audit finding Advanced

An attacker can stuff a Solana Outbound transaction with multiple instructions to block it from finalizing

A Solana outbound transaction is expected to contain only one or two instructions, but an attacker can front-run a valid transaction and add extra instructions, causing the gateway instruction parsing to fail. This prevents the outbound from finalizing, so the sender's withdrawal is stuck and their refund is delayed.

g Follow

Originally disclosed on Sherlock

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

Found by

g

Summary

A Solana Outbound transaction is expected to have 1 or 2 instructions. An attacker can exploit this expectation and force the Gateway instruction parsing to fail by stuffing a valid Outbound transaction with at least two more instructions. This will block the Outbound from finalizing because ProcessOutboundTrackers() will always fail when it calls CheckFinalizedTx() on the transaction.

Root Cause

An attacker can exploit the expectation that a Solana Gateway transaction must only have 1 or 2 instructions.

GOLANG
	instructionCount := len(tx.Message.Instructions)
	if instructionCount < 1 || instructionCount > 2 {
		return nil, fmt.Errorf("unexpected number of instructions: %d", instructionCount)
	}

	// get gateway instruction
	instruction := tx.Message.Instructions[instructionCount-1]

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

This issue can be exploited by an attacker front-running a valid Outbound transaction or by a malicious Observer.

  1. An attacker observes a valid increment_nonce Outbound transaction. They front-run this transaction and replace it with the valid increment_nonce instruction plus two more valid instructions.
  2. The transaction succeeds and uses up a nonce. Since no other Outbound transaction exists with the same nonce, an Observer adds an Outbound Tracker for this transaction.
  3. When the Outbound Tracker is processed, checking the finalized transaction will always fail when it attempts to parse the gateway instruction because it has three instructions.
  4. Since SetTxResult() is never called on the nonce, no Observers will vote on the Outbound, and it will not finalize.
  5. The sender of the Outbound transaction will not get their withdrawal, and their refund will not get triggered in Zetachain.

Impact

The sender of the Outbound transaction will lose their withdrawn funds. The Observers must manually vote failure on the victim's Outbound before the victim can get a refund. There can be a significant delay before their funds are recovered. There is no loss for the attacker.

PoC

No response

Mitigation

Consider removing any expectations on the format/structure of the Solana transaction.

Discussion

sherlock-admin2

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

gjaldon

The instructions are now parsed without expecting a certain number of instructions in the transaction. For as long as the transaction includes a valid Gateway instruction that matches the current nonce, it will be parsed successfully.

The original report as published on Sherlock, by g. 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 sender loses access to their withdrawn funds until observers manually vote failure, causing a significant delay; the attacker suffers no loss.

What the attacker needed

Attacker can front-run transactions; or attacker is a malicious observer

How it was found

  1. Observe a valid increment_nonce outbound transaction.
  2. Front-run it and replace it with the same valid instruction plus two more valid instructions.
  3. The transaction succeeds and uses a nonce, so an observer adds an outbound tracker.
  4. When the tracker is processed, parsing fails because the transaction has three instructions.
  5. SetTxResult is never called, so no observers vote and the outbound does not finalize.

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, a transaction is created on the source chain. Here, the system assumed that transaction would always have a fixed small number of steps (instructions). An attacker can add extra steps to a valid transaction, which makes the system's checker reject it, so the money never completes its journey and gets stuck.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by g

View all

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

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.