Anyone can mint themselves an NFT with someone elses Santa Tokens.
the function buyPresent(...) contains
, which burns the Santa Token of the gift recipient not the sender. Because SantasList has permission to burn SantaTokens, this bug allows anyone to arbitrarily burn another users tokens and mint themselves nft's.
this breaks the logic of the code, and in practice allows an attacker to mint themselves a gift with someone elses Santa tokens.
POC:
Manual Review, foundry testing.
Make the following changes,
-Burn the correct token
Mint to the correct address:
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.