Bots (or other sophisticated players) can change SantasList::Status
of the user to NAUGTY
immediately after Santa sets status of the user to NICE
, thus making users ineligible for claiming presents.
Function checkList(address person, Status status)
has no access control, so anybody can change users status.
As coming from comments, checkList()
should be callable only by Santa, which is not the case.
An attacker can use a bot that will:
Wait for Santa to change the status of a user to eligible, e.g., NICE or EXTRA_NICE
Immideately send following transaction to change status back to NAUGHTY
User transactions for claiming his presents will revert
Any further attempts to change back the Status
by non-sophisticated players will be backrunned by bot
Foundry PoC below:
Full test on GitHub repo fork
Foundry
Add access modifier
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.