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

Anyone can call checkList function

Summary

Missing access control on checkList function allows it to be called by any user

Vulnerability Details

function testAnyoneCanCheckListOnce() public {
vm.prank(user);
santasList.checkList(user, SantasList.Status.EXTRA_NICE);
assertEq(uint256(santasList.getNaughtyOrNiceOnce(user)), uint256(SantasList.Status.EXTRA_NICE));
}

The above poc shows that the a user can call the checkList function and set their status to whatever they like

Impact

Users can change/set their status or any user's status at will

Tools Used

Manual Review

Recommendations

Add the onlySanta modifier to the checkList function

Updates

Lead Judging Commences

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!