Root Cause: The burn function in the BidBeasts contract allows any user to burn any token without verifying ownership or approval, as it lacks an access control check (e.g., using _isApprovedOrOwner). This violates the ERC-721 standard, which mandates that only the token owner or an approved operator should be able to destroy a token. The current implementation relies solely on the internal _burn call without restrictions.
Impact: This vulnerability enables malicious actors to burn tokens they do not own, resulting in permanent loss of assets for legitimate owners. It breaks the trust and ownership guarantees expected in NFT contracts, potentially causing financial and sentimental damage to users and severely undermining confidence in the BidBeasts platform.
The BidBeasts::burn function currently allows any user to burn any token, as there is no access control check in place.
This violates the expected ERC-721 behavior where only the token owner or an approved operator should be able to burn a token.
Likelihood: High. The vulnerability is exploitable by any user with access to the contract, but it requires the attacker to target specific tokens, which may depend on their visibility or value. The likelihood increases in an open marketplace with active NFT trading.
Impact: High. The ability to destroy others’ tokens without authorization poses a significant security risk, leading to asset loss, user dissatisfaction, and potential legal or reputational damage to the platform. This severity warrants immediate attention and remediation.
This test demonstrates an unauthorized burn vulnerability in BidBeasts::burn.
Any arbitrary address (not token owner or approved) can call burn(tokenId) and permanently destroy another user’s NFT.
This test checks if an attacker can burn a token that they do not own or have approval for.
Results:
Alice owns tokenId initially with balance = 1
Attacker (no approval, not owner) calls burn(tokenId)
Alice’s balance becomes 0 and ownerOf(tokenId) reverts (token destroyed)
→ Confirms missing access control on burn()
Add the following to the BidBeastsNFTMarketTest.t.sol test file.
Restrict the BidBeasts::burn function so that only the token owner or an approved operator can call it.
For example:
This ensures burning is consistent with ERC-721 security standards.
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.