Unsafe NFT transfer using transferFrom instead of safeTransferFrom, can lead to NFT being locked in a contract that is not well prepared to handle NFTs.
When an auction is to be settled, and the NFT sale is to be executed using BidBeastsNFTMarket:_executeSale, the NFT tranfer is done using transferFrom. While this is fine for EOA recievers, Smart contract recievers are at a risk of locking the NFT forever if they don't have mechanism in place to transfer the NFT out of the contract.
With transferFrom, the implementation of onERC721Received is not enforced, meaning that any Smart contract will be able to receive the NFT transfer, whether it is prepared to handle NFTs or not.
Likelihood:
Reason 1: This happens anytime an auction sale is executed
Impact:
Potential locking of received NFT forever
This shows how a smart contract receiver that does not have the standard IERC721Receiver implemented receives an NFT, with no way to transfer it out of the contract, essentially locking the NFT in the contract.
Place the following code in BidBeastsNFTMarketTest.t.sol
Use the standard ERC721 safeTransferFrom function to transfer NFTs instead of transferFrom
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.