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

Attacker can arbitrarily burn anyone's santaToken, and buy present with other's santaToken

Summary

Attacker can arbitrarily burn anyone's santaToken, and buy present with other's santaToken

Vulnerability Details

Anyone with santaToken can call buyPresent(), then it burns santaToken from presentReceiver which is an argument that can be arbitrarily set to anyone's address by the attacker instead of burning from msg.sender, then attacker can use other's santaToken to buy present for themselves

Impact

Attacker can arbitrarily burn anyone's santaToken, and buy present with other's santaToken

Tools Used

Manual review

Recommendations

It should burn from msg.sender instead of presentReceiver that can be set to anyone's address

Updates

Lead Judging Commences

inallhonesty Lead Judge almost 2 years 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.