The SantasList contract contains a critical vulnerability that allows any user to self-assign the status of EXTRA_NICE without proper authorization from Santa (the contract owner). This can be exploited to unfairly claim both NFTs and SantaTokens.
The vulnerability arises from the implementation of the checkList function in SantasList.sol. Contrary to the intended design, where only Santa can assign statuses, the checkList function lacks a onlySanta modifier. This oversight allows any address to call checkList and change its status to EXTRA_NICE. When followed by the legitimate checkTwice function call by Santa, the user can then claim their rewards.
Below is my POC:
This vulnerability poses a high risk of unauthorized token minting and NFT collection. It undermines the contract's integrity by allowing users to bypass the intended security checks, leading to potential abuse and exploitation.
Foundry
The simplest solution is to add the onlySanta modifier to the checkList function, ensuring that only the contract owner (Santa) can assign statuses to addresses.
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.