As per the protocol's documentation, SantasList::checkList
function is only intended to be executed by Santa to do a first pass on someone if they are naughty or nice. But there are no checks put in place in the code to ensure this condition.
Hence, a malicious user can execute this function to tamper with the status of any and all users on Santa's List as well as add new users with their desired status, compromising the integrity of data stored on the protocol.
Following is the vulnerable piece of code in the SantasList::checkList
function :
As is evident in the code, there are no checks in place to prevent users other than Santa to execute this function.
Santa: Deployer of the protocol.
Attacker: Any malicious user on the network other than Santa.
Victim: Any non-malicious user participating in Santa's List protocol.
Write and run the following test case in the SantasListTest.t.sol
test file.
This vulnerability grants unauthorized access to any malicious actor on the network to perform following actions :
add more of their own addresses with NICE
and EXTRA_NICE
'first pass' statuses to increase their chances of winning more prizes after the second pass.
change statuses of users already present in the protocol as per attacker's will and benefit.
Foundry
The vulnerable function needs the SantasList::onlySanta
modifier added to it which is already defined in the protocol.
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.