Ethereum account balance manipulation
Coinbase's ETH receiving code credited deposits from a smart contract even when the contract execution later failed and reverted. An attacker could repeatedly inflate their Coinbase balance without the ether actually leaving the contract.
- Triaged in 15 days
- Fixed in 30 days
- Paid in 30 days
- Disclosed after 3 months
Summary by the program
The researchers noticed an issue with our ETH receiving code when receiving from a contract. This allowed sending of ETH to Coinbase to be credited even if the underlying contract execution failed. The issue was fixed by changing the contract handling logic. Analysis of the issue indicated only accidental loss for Coinbase, and no exploitation attempts.
The Security team thanks @vicompany for the quick disclosure, and also the internal team for pushing a fix within hours. We do appreciate @vicompany's patience as the full communication loop back to HackerOne took significantly longer than the fix deployment cycle.
Summary by the researcher
Short Summary: By using a smart contract to distribute ether over a set of wallets you can manipulate the account balance of your Coinbase account. If 1 of the internal transactions in the smart contract fails all transactions before that will be reversed. But on Coinbase these transactions will not be reversed, meaning someone could add as much ether to their balance as they want. When you look up the Coinbase wallet address after this transaction you will see that it is empty, but checking your Coinbase wallet will show your funds.
Steps To Reproduce:
- Setup a smart contract with a few valid Coinbase wallets and 1 final faulty wallet (always throw exception when receiving funds smart contract for example)
- Transfer appropriate funds to smart contract.
- Execute smart contract adding the set amount of ether to the Coinbase wallets without ever actually leaving the smart contract wallet because the complete transaction fails at the last wallet.
- Repeat until you have more than enough ethereum in your Coinbase wallet.
- Cash out, transfer to off site wallet
For some more information see https://www.vicompany.nl/magazine/from-christmas-present-in-the-blockchain-to-massive-bug-bounty
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
Likely the receiving code credited internal ETH transfers without verifying that the entire smart contract transaction had completed successfully.
Impact
An attacker could inflate their Coinbase ether balance arbitrarily and cash out, though the text states only accidental loss occurred and no exploitation attempts were seen.
What the attacker needed
A Coinbase account; ability to deploy a smart contract; funds to send to the contract
How it was found
- Set up a smart contract with several valid Coinbase wallets and one final wallet that always rejects funds.
- Send funds to the smart contract.
- Execute the contract so it sends ether to the Coinbase wallets, but the whole transaction reverts at the last wallet.
- Repeat until the Coinbase balance is large enough.
- Cash out or transfer to an off-site wallet.
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 you send cryptocurrency through a smart contract, the whole transaction can be undone if any part fails. Coinbase's system was crediting the money before checking that the transaction had fully succeeded, so someone could make it look like they had deposited funds that were never really sent.
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.