Scruffy Chartreuse Wolverine
High
The partial refund mechanism that does not handle failures in both ETH and WETH transfers will cause funds to become trapped for previous bidders as a malicious bidder will exploit the refund fallback to lock funds within the contract.
The choice to implement a two-tiered refund mechanism using _safeTransferETHWithFallback, which first attempts to refund via ETH and falls back to WETH upon failure, is flawed.
This design does not account for scenarios where both ETH and WETH transfers fail, leaving no alternative pathway for refunds.
- An active auction exists with a previous bidder who is due a refund.
- The previous bidder controls a smart contract that:
- Reverts ETH transfers by failing the receive or fallback functions.
- Rejects or fails WETH transfers, either intentionally or due to misconfiguration.
- The WETH contract remains operational and is not paused or compromised.
- The recipient's contract does not handle WETH transfers appropriately, causing them to fail.
- Attacker deploys a bidder contract that maliciously rejects ETH transfers
- The attacker uses this malicious bidder contract to place a bid, becoming the highest bidder in the auction.
- A legitimate user places a higher bid, triggering the refund process to the attacker’s MaliciousBidder contract.
- The
_safeTransferETH
function attempts to send ETH to the MaliciousBidder contract, which reverts the transaction. - The fallback to WETH transfer also fails because the MaliciousBidder contract rejects WETH transfers.
- Both refund attempts fail, resulting in the refund amount being permanently locked within the auction house contract.
Funds intended for the previous bidder remain inaccessible.
Deploying a malicious contract that rejects ETH and WETH transfers is straightforward for an attacker. The auction contracts do not impose restrictions or validations on the recipient's ability to handle refunds, making the attack vector easily accessible.
No response
Transition from actively pushing refunds to maintaining a ledger of pending refunds that bidders can withdraw manually. This approach eliminates reliance on the recipient’s ability to accept ETH or WETH transfers, ensuring that refunds can always be retrieved by the rightful owners.