Skip to content
Business logic Audit finding Intermediate

An attacker can steal frozen user ETH due to Dispatcher error

The Dispatcher contract's native-transfer command ignores whether the low-level ETH call to the recipient succeeded, so a failed transfer leaves the user's ETH sitting in the contract. A malicious user could then call the same transfer command to take those stranded funds.

din Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#44131 [SC-Low] An attacker can steal frozen user ETH due to Dispatcher error

Submitted on Apr 17th 2025 at 08:12:43 UTC by @din for Audit Comp | Spectra Finance

Description

Brief/Intro

This is not an user error, because the user cannot be aware if a recipeint contract fallback/receive will revert at a specific moment. More details why this will happen inside the POC.

Dispatcher.sol does not check if the low lvl call for sending ETH is successfull. If the call fails, the tx does not revert and the users funds remain stuck in the contract, without any way for the user to know that his funds did not reach the destination address. A malicious user can steal those stuck funds immedeately.

Vulnerability Details

The TRANSFER_NATIVE command does not check if the low lvl call is successfull.

 else if (command == Commands.TRANSFER_NATIVE) {
    (address recipient, uint256 amount) = abi.decode(_inputs, (address, uint256));
    (bool success, ) = payable(recipient).call{value: amount}(""); <@
}

As a result, all failed calls will NOT cause the execute() call to revert. ETH sent from the user will be stuck in the Router/Dispatcher contracts

Impact Details

An attacker will steal frozen user's ETH due to a bug inside Dispatcher.sol

References

https://github.com/immunefi-team/Spectra-Audit-Competition/blob/main/src/router/Dispatcher.sol?utm\\_source=immunefi#L483C1-L486C11

Proof of Concept

Proof of Concept

  1. A honest user calls Dispatcher::execute() with command: TRANSFER_NATIVE and sends 100 eth to a recepient contract

  2. The recipient's fallback/receive are temporary frozen by the admins of the recepient address due to a hack. The recipient contract reverts intentionally until the recipient contract team troubleshoots and fixes the vulnerability. This is outside of the Spectra user's control and there is no way for them to know it before executing the Spectra command. // Recipient's fallback

           fallback(){
                 if(isPaused) > revert("Cannot accept ETH at this moment. Try again later")
          }
    
  3. The user's ETH remains stuck in Dispatcher.sol due to the lack of low lv call status.

  4. A malicious user immediately calls Dispatcher::execute() TRANSFER_NATIVE and steals the funds.

The original report as published on Immunefi, by din. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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 TRANSFER_NATIVE branch performs a low-level call to the recipient but never checks the returned success flag, so a failed transfer does not revert the transaction.

Impact

A malicious user could steal ETH that honest users sent but which became stuck in the contract after a failed transfer.

What the attacker needed

Recipient rejects ETH at that moment; attacker can call execute()

How it was found

  1. An honest user calls execute() with the TRANSFER_NATIVE command, sending ETH to a recipient contract.
  2. The recipient's fallback or receive function is temporarily paused and reverts on purpose.
  3. Because the call result is not checked, the user's ETH stays stuck in the Dispatcher contract.
  4. A malicious user calls execute() with TRANSFER_NATIVE and takes the stranded funds.

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 a contract sends ETH to another address, it should check whether the transfer actually worked. Here the code ignores the result, so if the recipient rejects the money, the ETH stays inside the contract instead of going back to the user. Anyone who can trigger a transfer from that contract could then move the leftover ETH to themselves.

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 din

View all

1 more disclosed report, best first.

More from Spectra Finance

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.