Aurora Withdrawal Logic Error Bug Fix Review
A withdrawal logic error in Aurora's bridge allowed an attacker to forge a proof of a burn on NEAR without actually burning tokens, enabling theft of ETH from the EthCustodian contract. At the time, 50,550.9 ETH (worth about $62.9 million) was at risk.
immunefi.com
Published on immunefi.com
On June 16, an anonymous whitehat submitted a critical vulnerability to Aurora via Immunefi, which consisted of a withdrawal logic error. At the time of the submission, on block 14970303, 50550.9 ETH was on the vulnerable contract.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The Aurora contract set itself as the executor for view calls, and the bridge's withdraw function only checked the executor and the custodian address in the returned data, not that the data came from a real burn transaction.
Impact
An attacker could have stolen up to 50,550.9 ETH (about $62.9 million at the time) from the EthCustodian contract without burning any tokens on Aurora; the text does not mention any defence that limited the exploit.
What the attacker needed
Ability to deploy a contract on Aurora; ability to call Aurora view function; wait for light client update
The fix
The Aurora contract was modified to check that any output longer than 55 bytes does not contain the EthCustodian address, throwing an error if it does; a longer-term fix is planned to use state proofs instead of execution proofs.
How it was found
- Deploy a contract to Aurora that returns attacker-controlled bytes (the Echo contract).
- Craft a payload that deserialises to a BurnResult with the desired amount, recipient, and the EthCustodian address.
- Call the view function on Aurora with the Echo contract and the payload, causing NEAR to record a successful transaction containing the payload.
- Wait for the block with that transaction to be propagated to the light client on Ethereum.
- Extract the proof using NEAR's API endpoint.
- Call the withdraw function on the EthCustodian contract with the proof, which passes all checks and releases ETH.
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 write-up has not been written yet. The Original tab links to the source.
Aurora is a system that lets people use Ethereum-style contracts on another blockchain called NEAR. To move funds between them, a bridge checks that a transaction happened on the other side. The bug let someone create a fake record of a withdrawal on NEAR, so the bridge on Ethereum released real ETH without the corresponding tokens being destroyed.
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.