Withdrawals can be locked forever if recipient is a contract
The claim function sends ETH using transfer(), which forwards only 2300 gas, so a contract wallet with a receive function needing more gas cannot claim. If a user withdraws from such a contract, the ETH becomes permanently locked in the WithdrawQueue contract.
LessDupes Follow with Bauchibred and grearlake
Originally disclosed on Code4rena
Submitted by LessDupes, also found by Bauchibred and grearlake
The WithdrawQueue contract allows users to request withdrawals of their ezETH tokens in exchange for a selected asset, such as ETH or an ERC20 token. After a cooldown period, users can call the claim() function to receive their withdrawn assets.
When the selected asset is ETH, the claim() function sends the ETH using the low-level transfer() function:
payable(msg.sender).transfer(_withdrawRequest.amountToRedeem);
However, transfer() only forwards 2300 gas, which is not enough for the recipient to execute any non-trivial logic in a receive() or fallback function. For instance, it is not enough for Safes (such as this one in use by the protocol) to receive funds, which require > 6k gas for the call to reach the implementation contract and emit an event:
Note: to view the provided image, please see the original submission here.
In this case, the impact is higher than that reported by 4naly3er because claim() requires the caller to be the same address that initiated the original withdrawal request via withdraw().
If a user calls withdraw() from a contract account like a multisig or smart contract wallet that has a receive() function requiring >2300 gas, their subsequent claim() call will fail permanently. The withdrawn ETH will be locked in the WithdrawQueue contract forever, leading to loss of funds.
Proof of Concept
- Alice calls
withdraw()from her multisig wallet contract to withdraw 10 ETH worth of ezETH. The multisig contract is themsg.senderand gets saved as the withdrawal requester. - After the cooldown period, Alice tries to call
claim()from the multisig contract. However, the multisig has areceive()function that uses>2300gas. - When
claim()executespayable(msg.sender).transfer(_withdrawRequest.amountToRedeem), the multisig’sreceive()fails due to out of gas, and the transaction reverts. - The 10 ETH is now permanently locked in
WithdrawQueue, with no way for Alice to claim it.
Recommended Mitigation Steps
Use call() instead of transfer() to send ETH in claim():
(bool success, ) = payable(msg.sender).call{value: _withdrawRequest.amountToRedeem}("");
require(success, "ETH transfer failed");
This forwards all available gas and allows contract recipients to execute arbitrary logic.
Assessed type
ETH-Transfer
The ruling from the Supreme Court is only consultative.
From my point of view, a bot report that can be reasonably upgraded in severity due to the specific context of the code is a valid finding. Other judges might see this differently, so this ruling shouldn’t be seen as authoritative by itself in future audits. Instead, jurisprudence should arise from a broader consensus.
The 4naly3er report states that:
The use of the deprecated
transfer()function for an address may make the transaction failThat description of impact merits a Medium severity; however, in this case the severity is higher due to the two-step withdrawal process. The withdrawal address is locked in the
withdrawstep, which will work fine for smart contract wallets. However, upon callingclaim, the transaction will revert.The actual impact for the sponsor would be severe. The first few users trying this would have their funds locked. Even after efforts of communication by the team, this would be an ongoing issue that would bring considerable trouble.
I’m ruling this as a valid High, and all the duplicates that mention the two-step withdrawal process as valid duplicates.
Note: For full discussion, see here.
The PR allows contracts like multisigs to be able to claim the withdraw request in Native ETH by sending it through call instead of transfer.
Status: Mitigation confirmed. Full details in reports from 0xCiphky, grearlake, Fassi_Security, Bauchibred, and LessDupes.
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
The claim function uses the deprecated transfer() method, which forwards only 2300 gas, instead of call() which forwards all available gas.
Impact
ETH withdrawn by a contract wallet that requires more than 2300 gas to receive funds becomes permanently locked in the WithdrawQueue contract, causing loss of funds.
What the attacker needed
User withdraws from a contract wallet; Contract's receive() needs >2300 gas
The fix
The claim function was changed to use call() instead of transfer() to send ETH, allowing contract recipients to receive funds.
How it was found
- Alice calls withdraw() from her multisig wallet contract to withdraw 10 ETH worth of ezETH.
- After the cooldown period, Alice tries to call claim() from the multisig contract.
- The claim() function executes payable(msg.sender).transfer(...), but the multisig's receive() function needs more than 2300 gas.
- The transaction reverts due to out of gas, and the 10 ETH remains locked in WithdrawQueue.
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 a smart contract sends ETH, it can use a low-level method called transfer that only gives the receiving contract a tiny amount of gas (2300) to run its code. Many contract wallets, like multisigs, need more gas to accept ETH, so the transfer fails. Because the withdrawal must be claimed by the same contract that requested it, the funds get stuck forever.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.