BidBeasts_NFT_ERC721::burn anyone can burn arbitrary NFTsNormal behavior:
The burn function in an ERC721 implementation should only allow the owner of a token or an approved operator to destroy the token. This ensures that only authorized accounts can remove NFTs from circulation.
Issue:
In BidBeasts_NFT_ERC721.sol, the burn function is declared public and directly calls the internal _burn function without any ownership or approval checks. As a result, any address can burn any existing token, simply by knowing its tokenId.
Likelihood:
This occurs whenever an arbitrary user calls burn with a valid tokenId.
No prior authorization or ownership is required, making the attack trivial.
Impact:
An attacker can permanently destroy NFTs they do not own, leading to a total loss of user assets.
This undermines trust in the NFT collection and marketplace, and may result in a mass Denial-of-Service for the project.
Place the following into BidBeastsMarketPlaceTest.t.sol
Restrict the burn function by following the OpenZeppelin ERC721Burnable pattern. Require that the caller is either the token owner or an approved operator:
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.