In a properly secured NFT contract, the BidBeasts_NFT_ERC721::burn function should only allow the current owner of an NFT to destroy their own token. The function should verify that msg.sender is the owner of the specified token ID before proceeding with the burn operation, ensuring that only authorized users can permanently remove NFTs from circulation.
The BidBeasts_NFT_ERC721::burn function in the BidBeasts contract lacks any access control mechanism, allowing any user to call burn(uint256 _tokenId) on any NFT regardless of ownership. The function directly calls _burn(_tokenId) without verifying that msg.sender owns the token, enabling malicious actors to permanently destroy other users' valuable NFTs. This creates a critical security vulnerability where any address can destroy any NFT in the collection, leading to permanent loss of user assets and causing catastrophic harm to the overall protocol.
Likelihood:
High - The vulnerability will occur in every instance where the BidBeasts_NFT_ERC721::burn function is called, as there are no conditional checks or access controls that could prevent unauthorized burning - the function will always execute regardless of the caller's ownership status. Malicious actors will attempt to exploit immediately upon discovering the lack of access control.
Impact:
High - Users will permanently lose their valuable NFT assets without any possibility of recovery, as burned tokens are completely removed from the blockchain and cannot be restored, minted again, or transferred back to the original owner.
High - The entire NFT collection becomes unusable as users cannot safely hold or trade tokens knowing that any malicious actor can destroy their assets at any time, leading to immediate devaluation and abandonment of the project.
This test proves that a non-owner can burn any user's NFT.
Deploy and setup
Mint an NFT to SELLER
Verify SELLER owns the NFT
Verify BIDDER_1 does not own the NFT
Have BIDDER_1 (who doesn't own the NFT) burn it
Verify the NFT was burned (ownerOf should revert)
ownerOf reverts proving the NFT was burned by a non owner
Add an access control to the BidBeasts_NFT_ERC721::burn function.
In the BidBeasts ERC721 implementation, the burn function is publicly accessible, allowing any external user to burn NFTs they do not own. This exposes all tokens to unauthorized destruction and results in permanent asset loss.
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.