src/BidBeasts_NFT_ERC721.sol: BidBeasts::burn(uint256 _tokenId) lacks access control, allowing any caller to burn any user’s NFTNormally, only the NFT owner (or an authorized operator/approved address) can burn an NFT.
In this protocol, src/BidBeasts_NFT_ERC721.sol: BidBeasts::burn(uint256 _tokenId) lacks access control, allowing anyone to burn any NFT.
Likelihood:
This occurs whenever a malicious user calls burn(uint256 _tokenId)
Impact:
Any user’s NFTs can be irreversibly destroyed.
First we need to make a quick fix in test/BidBeastsMarketPlaceTest.t.sol:BidBeastsNFTMarketTest::setUp()
Please add the following test to test/BidBeastsMarketPlaceTest.t.sol:BidBeastsNFTMarketTest:
Then run: forge test --mt testAnyoneCanBurnAnyNFT
Output:
In src/BidBeasts_NFT_ERC721.sol: BidBeasts::burn(uint256 _tokenId):
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.