Anybody that holds any SantaToken is at risk of someone else burning their tokens to mint an NFT.
When calling the 'SantasList.sol::buyPresents' function, any address can be input to burn tokens from and thus purchasing the NFT for free for the function caller. Any address that holds any SantaToken is at risk of losing their tokens because anybody could burn/redeem them for the NFT. In the 'SantasToken.sol::burn' function the address being burned from is the address input by the caller, but this is not necessarily the msg.sender of the 'SantasList.sol::buyPresents' function.
The below test passes as true showing that 'user2' can use/burn 'user's tokens to purchase the NFT for themselves.
--Foundry
It is recommended to change the logic in the 'SantasList.sol::buyPresents' function to check if the input address is the same as the msg.sender.
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.