The deposit() function in Treasury contract accepts any ERC20 token without validation, allowing attackers to overflow _totalValue with malicious tokens.
The deposit() function lacks token validation:
If an attacker sends a malicious token of around type(uint256).max, the _totalValue variable can overflow, preventing legitimate users from depositing tokens.
Attackers can prevent legitimate users from depositing tokens by causing an overflow in the _totalValue variable.
Implement a whitelist mechanism to restrict deposits to only approved ERC20 tokens.
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.