Incorrect validation of NFT balance allows malicious users to mint more than once
SantasList::collectPresent
incorrectly validates that the sender has no NFT balance in their wallets, to detect if they have already minted, by checking if the balance of the sender is not 0. A malicious user can mint an NFT, transfer it to another address and then mint again. The incorrect function validation will let this go by.
Output:
HIGH. User's can mint infinite amount of NFTs
Manual Review
Foundry
Add a mapping that stores if an address has already claimed the present NFT. Alternatively, prevent users from transferring NFTs, so the balanceOf
check can be valid.
Relying on balanceOf > 0 in collectPresent() allows the msg.sender to send their present to another address and then collect again.
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.