Description:
The function TradingAccountBranch::createTradingAccount
allows any referral code to be used when creating a trading account. This means that users who are not registered or invalid users on Zaros can receive referral commissions.
Impact:
This vulnerability can lead to misuse of the referral system, where referral commissions are awarded to unregistered or invalid users. This could potentially result in financial losses for Zaros, as the platform may pay out commissions to non-legitimate users. Additionally, it could undermine the integrity of the referral program, affecting the trust and satisfaction of genuine users.
Proof of Concept:
The code provided demonstrates a scenario where an invalid user (fatma) is set as a referral for another user (naruto). Despite fatma not being a valid user on Zaros, they can still receive referral commissions.
Manual Audit
To address this issue, implement a verification mechanism for referral codes before they are accepted during account creation. This could involve:
Checking if the referral code corresponds to a registered and valid user on Zaros.
Adding additional checks and validations to prevent the misuse of referral codes.
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.