Cronos Theft Of Transactions Fees Bug Fix Review
A missing check allowed a Cosmos-signed transaction to omit the Ethereum extension option, so the gas fee was never deducted but a refund was still issued. An attacker could repeatedly steal the transaction fees collected in each block.
immunefi.com
Published on immunefi.com
Transactions in blockchain are like sound traveling through air. We communicate with others through transactions; we announce what we’re doing and to whom we’re sending the message to.
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 transaction handler did not verify that a MsgEthereumTx included the ExtensionOptionsEthereumTx, so the gas-charging antehandler was skipped while the refund logic still ran.
Impact
An attacker could steal the transaction fees collected in the current block and repeat this for every block, affecting user rewards but not draining funds.
What the attacker needed
Ability to submit a Cosmos-signed transaction; a valid Ethereum signature
The fix
The fix was to check that the MsgEthereumTx is contained inside the transaction, applied in the v0.6.5 binary upgrade.
How it was found
- Construct a Cosmos-signed MsgEthereumTx with a valid Ethereum signature but without ExtensionOptionsEthereumTx and with a high GasLimit.
- Submit the transaction to a node.
- The transaction executes without the gas charge being deducted, but a gas refund is still issued.
- Repeat the attack for each block to seize the transaction fees in that block.
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.
A blockchain transaction normally pays a fee upfront, and any unused part is refunded afterwards. Here, a specially crafted transaction skipped the upfront payment but still received the refund, so the attacker gained money that was never theirs. Repeating this in every block let them take the fees other users had paid.
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.