claimAuction
can be DOS if highestBidder is a contract that doesn't implement onERC721Received
#565
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-739
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/hardhat/smart-contracts/AuctionDemo.sol#L112
Vulnerability details
Impact
The issue here stems from the the fact that the
AuctionDemo
contract uses the push pattern instead of the pull pattern.In this case if the
highestBidder
is a smart contract wallet, but doesn't implementIERC721Receiver
or theonERC721Received
function, then theclaimAuction
function will fail causing permanent loss of funds to all bidders in the auction.Proof of Concept
The following call will fail in this scenario
POC:
Tools Used
Manual
Recommended Mitigation Steps
Assessed type
DoS
The text was updated successfully, but these errors were encountered: