The NFTLiquidator
contract includes a buyback mechanism that allows users to recover their liquidated NFTs by paying 110% of the original debt. During a buyback, if there was a previous bid on the NFT, the contract attempts to refund the highest bidder before proceeding with the buyback transaction.
The buyBackNFT()
function uses a direct transfer()
call to refund the highest bidder's funds before processing the buyback. This creates a vulnerability where a malicious bidder can prevent buybacks by using a contract address that reverts when receiving ETH:
High. A malicious actor can completely block the NFT buyback mechanism, preventing legitimate users from recovering their NFTs. This could result in significant financial losses for users who would otherwise be willing and able to pay the premium to recover their assets.
High. The attack is straightforward to execute, requiring only a simple contract deployment that reverts on ETH receipt. There are no external dependencies, timing constraints, or complex prerequisites needed to exploit this vulnerability.
Alice's NFT gets liquidated with a debt of 10 ETH
Attacker deploys a contract that reverts when receiving ETH
Attacker uses this contract to place a small bid on Alice's NFT
Alice attempts to buy back her NFT by paying 11 ETH (110% of the debt)
The buyBackNFT()
transaction reverts when trying to refund the attacker's bid
Alice is unable to recover her NFT, despite being willing to pay the premium
Implement a "pull over push" pattern for handling bid refunds. Instead of immediately transferring ETH to the previous highest bidder during the buyback process, store their refund in a mapping and let them withdraw it later:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.