The function SantasList::checkList
should be called only by Santa, but it is external
and without any access control so it can be called by anyone.
The function SantasList::checkList
is not protected by the onlySanta
modifier like the SantasList::checkTwice
function, which means that anyone can call this function and set the status for any address. This is a critical vulnerability as it allows unauthorized manipulation of the status of an arbitrary address.
Anyone can call the SantasList::checkList
function and set the status for any address. The function testEveryoneCanCallCheckList
demonstrates this vulnerability. You can add the following test function to the test file SantasListTest.t.sol
and execute it with the foundry command: forge test --match-test testEveryoneCanCallCheckList
VS Code, Foundry
Add onlySanta
modifier to the SantasList::checkList
function:
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.