Summary
The updateReferrerInfo
function in the SystemConfig.sol
contract lacks proper access control, allowing any user to call the function and update the referrer information, only The Refferer its self can't call it. This can lead to unauthorized manipulation of referral rates, which could result in financial losses or unfair distribution of rewards
The updateReferrerInfo
function is currently marked as external
, allowing any account to call it. The only restriction is that the caller cannot be the same as the referrer being updated. This design allows for potential abuse:
An attacker could update referrer information for any address without proper authorization.
Legitimate referrers could have their rates modified without their consent.
The contract owner has no control over who can modify referral settings.
A malicious actor could exploit this by:
Creating multiple accounts
Using one account to set favorable referral rates for another
Potentially manipulating the referral system
This vulnerability could lead to unauthorized users manipulating referral rates, resulting in financial losses for the protocol. Malicious actors could decrease their referral rates without proper authorization, skewing the distribution of rewards and undermining the integrity of the referral system.
Manual code Review
Foundry
Add access control to the updateReferrerInfo
function. This could be done by:
Adding an onlyOwner
modifier to restrict access to the contract owner.
Valid high severity. There are two impacts here due to the wrong setting of the `refferalInfoMap` mapping. 1. Wrong refferal info is always set, so the refferal will always be delegated to the refferer address instead of the caller 2. Anybody can arbitrarily change the referrer and referrer rate of any user, resulting in gaming of the refferal system I prefer #1500 description the most, be cause it seems to be the only issue although without a poc to fully describe all of the possible impacts
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.