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

Function Checklist() does not have a restricted call.

Summary

Function checkList should only be callable by santa. Instead it is an unrestricted function that anyone can call.

s_theListCheckedOnce[person] = status;
emit CheckedOnce(person, status);
}```
## Vulnerability Details
This external call should be only callable by Santa but, but can be called by anyone.
## Impact
Anyone can add an address / malicious contract and status to SantasList. They can also change the Status of previously enter address for example : NAUGHTY -> EXTRA NICE. They can also add as many address as they want as it is unrestricted.
## Tools Used
HardHat
## Recommendations
add the "santaOnly" Modifier to this function
```function checkList(address person, Status status) external onlySanta {
s_theListCheckedOnce[person] = status;
emit CheckedOnce(person, status);
}```
Updates

Lead Judging Commences

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

Give us feedback!