Context: FeeCollector#L199
The claimRewards
function in FeeCollector.sol
allows any user to claim rewards on behalf of another address, leading to unauthorized withdrawals.
The function accepts a user
parameter and allows any caller to pass an arbitrary address, enabling them to claim rewards for another user. This lack of access control means an attacker can drain rewards from any account.
Malicious users can steal rewards from any user by calling claimRewards
with their address. This could lead to significant loss of funds for legitimate users.
Manual code review
Restrict the claimRewards
function so that only the user
themselves can call it. Modify the function to check msg.sender == user
before proceeding with the claim.
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.