When transferring an ERC721 token, the contract should verify that the recipient is capable of receiving ERC721 tokens. This ensures tokens are not accidentally sent to contracts that cannot handle them and would otherwise become permanently stuck.
In this implementation, the _executeSale function uses BBERC721.transferFrom(address(this), bid.bidder, tokenId) without verifying that bid.bidder is an EOA or an ERC721-compatible contract. As a result, if the bidder is a contract that does not implement onERC721Received, the NFT may be locked and irrecoverable.
Likelihood:
This occurs whenever a bidder is a contract that cannot process ERC721 tokens.
Many common smart contracts do not implement IERC721Receiver.
Impact:
NFTs transferred to such contracts become permanently locked.
Users lose access to their purchased assets, reducing trust in the marketplace.
The test passes, showing that the NFT was transferred to Bidder without reverting, even though Bidder does not implement onERC721Received. This demonstrates the vulnerability, as the NFT is now in a contract that cannot transfer it out (it’s stuck in the bidder contract).
Use safeTransferFrom instead of transferFrom to enforce ERC721 receiver compliance:
Non-safe transferFrom calls can send NFTs to non-compliant contracts, potentially locking them permanently.
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.