checkList() is missing the onlySanta modifier, so any address can set the first-check status of any other address. This breaks the intended two-step verification and lets anyone tamper with Santa's list.
checkList() is documented as "Only callable by santa", but it is declared external without the onlySanta modifier:
checkTwice() requires s_theListCheckedOnce[person] == status, and collectPresent() requires both checks to be NICE or EXTRA_NICE.
The attacker can also write any status for any address, including their own, so the first of the two required checks is controlled by an untrusted party. The comment "Only callable by santa" shows that restricting this function is the intended design.
Likelihood: High. No preconditions, any address can call it.
Impact: High. The access control and the integrity of the list are broken.
Explanation: the test calls checkList() from an arbitrary address (attacker, not Santa) to set the status of an unrelated address (victim) to NAUGHTY. The call succeeds and getNaughtyOrNiceOnce(victim) returns NAUGHTY, proving that no access control is enforced.
Explanation: the onlySanta modifier already exists in the contract and is applied to checkTwice(). Applying it to checkList() as well ensures that only i_santa can write to s_theListCheckedOnce, matching the documented behavior.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.