Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Can arbitrarily burn someone else's SantaTokens to buy presents

Summary

Can arbitrarily burn someone else's SantaTokens to buy presents

Vulnerability Details

There is no check in buyPresent() to verify if presentReceiver is the same as msg.sender. This can be exploited to burn someone else's SantaTokens and mint NFTs for oneself.

Impact

Tools Used

Recommendations

add below check

require(presentReceiver == msg.sender)
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

buyPresent should use msg.sender

Current implementation allows a malicious actor to burn someone else's tokens as the burn function doesn't actually check for approvals.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.