Improper Input Sanitization Error in Web3
The Aurora bridge's token transfer function parsed a user-controlled message to set a fee paid to a relayer, without validating that the fee was reasonable. An attacker could send worthless tokens to a victim with a maximum fee, causing the victim's funds to be transferred to the attacker.
Welcome back to our web3 bug bounty series, guys, I am your dear friend Vinay Sati back in this write-up, I am telling how to exploit web3 vulnerability and earn $$$$ easily.
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
Likely the fee value in the transfer message was not validated against the transferred amount or a maximum, allowing an attacker to set an arbitrarily large fee.
Impact
At the time of reporting, this could have allowed an attacker to drain user funds at a rate of 18.4 ETH per call.
What the attacker needed
Ability to create token mapping; victim receives worthless tokens
The fix
The vulnerability was fixed by removing the logic that assigns a non-zero transaction fee.
How it was found
- Create a mapping between a NEP-141 token and an ERC20 token.
- Transfer worthless NEP-141 tokens to the victim with a maximum fee in the message field.
- The victim's funds are transferred to the attacker's NEAR account as the fee.
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 tokens on another blockchain called NEAR. When tokens are moved between the two, a message can include an optional fee that is paid to a helper. The code trusted that fee without checking it, so an attacker could set it to a huge number and trick the system into taking a lot of money from someone else.
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.