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

Checklist function does not have access control

Summary

While the comments describe the function as "Only callable by santa", this doesn't seem to case. In fact there is no access control on this function so everyone can execute the function and set the status themselves.

Vulnerability Details

Since this function is open to anyone people are able to call this function for themselves and set the state to NICE or EXTRA_NICE or call the function to set someone else's address state to NAUGHTY.

Impact

While the checkTwice function has proper access control, it could result in an error when the status is not the same as the first one, so if an attacker sets someone else's address to NAUGHTY the transaction will be reverted when Santa wants to check it twice in case the person wasn't naughty.

Tools Used

vscode

Recommendations

Add "onlySanta" modifier to the checkList function

Updates

Lead Judging Commences

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

Access Control on checkList()

Anyone is able to call checkList() changing the status of a provided address. This is not intended functionality and is meant to be callable by only Santa.

Support

FAQs

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