Anyone can trade someone else's SantaToken for NFT to himself
The function buyPresent(address presentReceiver)
allows someone holding SantaToken
to trade it with NFT. The function implementation is wrong, it trades the SantaTokens of presentReceiver
passed as an argument for an NFT to msg.sender
without checking that presentReceiver
is the caller of the function.
This vulnerability allows anyone to trade someone else's SantaToken for NFT to himself.
Manual Analysis
Consider removing the argument presentReceiver
, and rely on 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.