In a standard ERC721 implementation, the burn() function should only allow the token owner or an approved operator to destroy the token. This ensures that users cannot maliciously burn assets they do not own.
Issue:
In the BidBeasts contract, the burn() function is publicly callable without any ownership or approval checks. As a result, any address can destroy any NFT, even if it does not belong to them. This leads to loss of assets for legitimate owners.
Likelihood:
The burn() function is marked public, so every user on-chain can call it.
No condition (require) prevents attackers from targeting arbitrary tokenIds.
Impact:
Any NFT in circulation can be permanently destroyed by anyone, causing direct financial loss.
The marketplace contract (BidBeastsNFTMarket) relying on these NFTs may also malfunction if an auctioned NFT is burned mid-auction.
A Forge test demonstrating an attacker burning another user's token:
Implement the onlyOwner modifier to the burn() function as well.
Replace the function with:
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.