Push to Cut ETH Network Fees Opens Funds-Draining Bug in Scaling Tool Arbitrum
The rush to find a way of lowering transaction costs on the Ethereum blockchain led developers behind scaling tool Arbitrum to miss a change in the latest version that would have allowed attackers to steal all funds sent to the network.
Arbitrum paid about 400 ether ($53,000) to the hacker who flagged the vulnerability.
The threat was found in the way transactions are submitted and processed on the network, through a tool known as a bridge, which allows users to transfer tokens between different blockchains. Attacks on bridges have become one of the biggest security threats in crypto, accounting for almost $1 billion stolen in the past year.
The white-hat hacker, known as 0xriptide, said in a Tuesday post that the vulnerability would affect any depositor attempting to bridge funds from Ethereum to Arbitrum Nitro, Arbitrum’s latest version.
0xriptide discovered that all incoming transactions through the bridge were sent via a message to the Arbitrum blockchain’s Delayed Inbox, which ran a check to see if the contracts behind those transactions were either in the completion process or had already been completed.
0xriptide found that slots meant for data storage were empty because a Nitro function meant to verify the transactions automatically changed the data. That would have allowed a bad actor to manipulate the bridge’s smart contract – accessible to everyone because it is open-source software – and set their own address as a receiver address.
A single line of code would have prevented anyone from making changes to the critical contract. It was, however, removed to allow for cheaper transactions and the vulnerability it created wasn't noticed, 0xriptide said.
“The largest deposit recorded on the inbox contract was 168,000 ETH (~$250mm) with typical total deposits in a 24-hour period ranging from ~1000 to ~5000 ETH.” This means the vulnerability could have potentially led to hundreds of millions of dollars in stolen funds.