A critical vulnerability exists in the SantaToken smart contract, allowing a specific user (address 0x815F577F1c1bcE213c012f166744937C889DAF17
) to illicitly transfer funds from any SantaToken holder without requiring their approval.
The transferFrom
function that SantaToken
has inherited is a modified version of the actual library solmate
. The modified version has a conditional check where if the msg.sender
is 0x815F577F1c1bcE213c012f166744937C889DAF17
which is the author as written in the NatSpec in SantasList.sol
, he is able to transfer tokens without needing the approval of the from
address. He is thus able to just transfer and steal all tokens from whoever has SantaTokens.
The transferFrom
function in the SantaToken contract, inherited from the solmate
library, has been modified in a way that introduces a significant vulnerability. According to the NatSpec documentation in SantasList.sol
, the address 0x815F577F1c1bcE213c012f166744937C889DAF17
is identified as the contract author. The modified transferFrom
function includes a conditional statement that permits this specific address to bypass the standard approval mechanism required for token transfers from a third-party account. As a result, the holder of this address can unilaterally and without authorization transfer SantaTokens from any account, effectively stealing their tokens.
Protocol Owner can steal tokens from all the SantaToken owners without approval.
Manual Review and Foundry
Remove the conditional block that is skipping the allowance check
Some sneaky elf has changed this library to a corrupted one where his wallet address skips all the approval checks for SantaToken! Shenanigans here - https://github.com/PatrickAlphaC/solmate-bad/blob/c3877e5571461c61293503f45fc00959fff4ebba/src/tokens/ERC20.sol#L88
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.