In Treasury, the lack of safeguards for unsupported ERC-20 tokens allows an attacker to inflate _totalValue to the maximum value, effectively preventing further legitimate deposits due to an overflow issue, leading to a denial-of-service (DoS) attack.
An attacker can create a malicious ERC-20 token that always reverts in transfer().
The attacker then deposits the maximum possible token amount (type(uint256).max) into the treasury contract. As _totalValue is incremented with each deposit, this results in an inflated _totalValue value.
Since _totalValue is used to track the total deposited assets, further deposits may be prevented due to overflow issues, causing a DoS condition.
The treasury contract is rendered unusable as _totalValue becomes an unmanageable large value.
Legitimate users are unable to deposit further funds.
Manual Review
Implement token allowlist or validation to ensure only supported tokens can be deposited.
OR add access controll to deposit()to allow only whitelisted users to deposits funds.
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.