The burn function in SantaToken.sol only verifies the caller is the SantasList contract, but doesn't validate that the burn target authorized the operation. Combined with Vulnerability 4, this enables unauthorized token destruction.
In SantaToken.sol, the function burns tokens from from without checking:
If from approved the burn
If from has sufficient balance
Any relationship between the ultimate caller and from
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
When called through buyPresent, this allows complete bypass of the ERC20 approval system. Anyone can destroy any token holder's balance.
No require(balanceOf(msg.sender) >= cost) exists.
Modify the burn function to accept only the authenticated caller's address:
Then update SantasList.buyPresent per Vulnerability 4's recommendation.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.