Aurora Improper Input Sanitization Bug Fix Review
The Aurora Engine's token transfer handler trusted a user-supplied fee field in the message, allowing an attacker to set an arbitrarily large fee. An attacker could transfer a worthless token to a victim and have the victim's account pay the attacker a large fee, draining funds.
immunefi.com
Published on immunefi.com
On June 10, an anonymous whitehat submitted a critical vulnerability to Aurora via Immunefi, which consisted of improper input sanitization.
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 code parsed a fee value from the attacker-controlled message and transferred that amount from the recipient to the relayer without validating it against any limit or actual cost.
Impact
An attacker could drain user funds at a rate of up to 18.4 ETH per invocation, though the text does not state whether any funds were actually lost.
What the attacker needed
A NEAR account; ability to create a token mapping; victim receives a token transfer
The fix
The vulnerability was fixed by completely removing the logic that assigns a non-zero transaction fee.
How it was found
- Create a NEP-141 to ERC20 mapping, which is permissionless.
- Transfer a worthless NEP-141 token to the victim, setting a very large fee in the message field.
- Receive the fee from the victim's account to the attacker's NEAR account.
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 tokens move between two blockchains. When someone sends a token, they can include a message that says how much of a fee the receiver should pay to a relayer. The code did not check that the fee was reasonable, so an attacker could set a huge fee and make the victim pay it to the attacker.
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.