Description: The rescue_tokens
function allows the owner to withdraw any amount of tokens from the contract, including tokens that are meant to be distributed to users through the vesting schedule. There are no safeguards to prevent the owner from draining all tokens, effectively stealing from users with valid claims.
Lines 167-177:
Impact: A malicious (or compromised) owner could:
Drain all tokens from the contract
Prevent legitimate users from claiming their vested tokens
Effectively steal all funds meant for distribution
While centralization risks are often rated as "low" severity, this is a high severity issue because there is no protection whatsoever against the owner taking all funds at any time, violating the core security assumption of a vesting contract.
Recommended Mitigation: Add restrictions to the rescue_tokens
function to ensure it can only rescue tokens that aren't allocated to users:
The `owner` is trusted and the function `rescue_tokens` can be called only by the owner and only in case of emergency. This means the owner will not act maliciously and will not call the function without need. Also, issues realated to the malicious admin actions are invalid according to the CodeHawks documentation: https://support.cyfrin.io/en/articles/10059196-findings-validity
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.