The ERC20
, associated with the provided GitHub link, contains a critical security vulnerability in the transferFrom
function. This vulnerability allows a specific address (0x815F577F1c1bcE213c012f166744937C889DAF17
) to directly modify token balances without adhering to the standard ERC-20 approval process, leading to potential unauthorized transfers and loss of user funds.
The vulnerability arises from intentional modifications made to the original solmate
library, as indicated in the Foundry configuration file (foundry.toml
). The remappings
section in the configuration remaps the original solmate
library to a modified version called solmate-bad
, where malicious code has been inserted into the transferFrom
function.
The impact of this vulnerability is severe. The specified address (0x815F577F1c1bcE213c012f166744937C889DAF17
) can exploit the flaw to drain tokens from any specified from
address without the usual approval process. This poses a significant risk to the security and integrity of the ERC-20 token, potentially resulting in financial losses for affected users.
Manual review
Immediate Code Reversion: Revert the modifications made to the solmate
library and use the original, unmodified version to eliminate the security vulnerability.
Communication with Users: If the token is already deployed and in use, communicate transparently with users about the discovered vulnerability, the actions taken, and any potential impact on their funds.
Timely Updates: Stay informed about security best practices and updates in the Ethereum ecosystem, and promptly apply any relevant patches or improvements.
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.