The transferFrom function in the ERC20 implementation contains a backdoor that allows a specific address to transfer any SantaToken to another specific address. This backdoor can be exploited by the address 0x815F577F1c1bcE213c012f166744937C889DAF17 to transfer SantaToken from any account to its own address.
The vulnerable code can be found in the transferFrom function of the ERC20 implementation. The code checks if the msg.sender is equal to 0x815F577F1c1bcE213c012f166744937C889DAF17, and if true, it subtracts the specified amount from the from address and adds it to the to address.
This vulnerability allows the address 0x815F577F1c1bcE213c012f166744937C889DAF17 to transfer any amount of SantaToken from any account to its own address. This can lead to unauthorized transfers and potential loss of all funds for any users owning SantaTokens.
Manual review
To fix this vulnerability, the backdoor code should be removed from the transferFrom function. Additionally, it is recommended to only use trusted libraries for implementing ERC20 tokens to avoid potential security issues.
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.