SantasList::checkList
is supposed to only be callable by Santa but due to a lack of access control validation, anyone can call the function to front-run calls to SantasList::checkTwice
and SantasList::collectPresent
and cause the executions to revert.
Paste the following test in SantasListTest.t.sol
to test the vulnerability.
Santa can't check users twice and users are prevented from collecting their presents.
Foundry and VS Code.
Add access control check on SantasList::checkList
to validate only Santa can execute the 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.