The SystemConfig::updateReferrerInfo
function lacks proper asignation, enabling users to either set themselves as their own referrer or update other users' referrer information without authorization.
The SystemConfig::updateReferrerInfo
function is meant to update a user's referral information. However, the current implementation allows users to set themselves as their own referrer or modify the referral information of other users, which should not be permitted.
This implementation allows users to update the referral information tied to the _referrer
address, rather than the address of the user making the request (msg.sender
). As a result, a user can set themselves as their own referrer or change the referral details of other users.
Although there is a check to prevent a user from setting themselves as their referrer:
This check is ineffective because users can still modify the referral information of other users, including setting their own address as the referrer.
Users can bypass restrictions and set themselves as their own referrer and can unauthorizedly update the referrer information of other users
Manual Code Review
Update the updateReferrerInfo
function:
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.