A specific address on the deployed chain (0x815F577F1c1bcE213c012f166744937C889DAF17) will be able to transfer the SantaToken at will after minting, due to use of malicious fork of solmate.
The makefile installs a fork of solmate
called solmate-bad
from this repo: https://github.com/PatrickAlphaC/solmate-bad. The ERC20
abstract contract transferFrom
function has been modified to allow the above address to transfer tokens from any address to any address.
Rug-pulling address could lock the token at the 0 address, or steal them for themselves. The attack could be made more effective by listening for the Transfer
event emitted from _mint
, to steal the tokens near-immediately after minting.
forge test
. The following test is a PoC showing the rug pulling address transferring SantaToken. It shouldn't pass, but does.
Ensure this use of solmate
, and any / all other dependencies are the from official sources. Further recommend a post-mortem to understand how precisely this malicious fork was introduced into the project.
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.