The function SantasList::buyPresent
burns the token of the address passed as argument, but the minted nft is taken buy the user that call the function.
An attacker can use the tokens of some victims to mint one or more NFTs without paying any tokens and without even having been included by Santa in his list.
I create this test to show the vulnerability:
An attacker can mint how many NFTs he wants using tokens from other victims.
Manual review and Foundry test.
The tokens should be burned to the user making the call (msg.sender), and the address passed as an argument should instead be used to mint the nft.
Current implementation allows a malicious actor to burn someone else's tokens as the burn function doesn't actually check for approvals.
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.