Lucene search

K
code423n4Code4renaCODE423N4:2022-12-TIGRIS-FINDINGS-ISSUES-627
HistoryDec 16, 2022 - 12:00 a.m.

Lack of access control

2022-12-1600:00:00
Code4rena
github.com
4
access control
referrals contract
system overwhelm
abuse
rewards
incentives

Lines of code

Vulnerability details

The ‘createReferralCode’ function in the ‘Referrals’ contract allows any address to create a referral code. This could potentially lead to spam or misuse of the system.

Impact

If an attacker is able to create a large number of referral codes, they could potentially overwhelm the system and cause it to become resource-intensive or even unresponsive.
If referral codes are being used for some kind of reward or incentive, allowing any address to create them could lead to abuse or manipulation of the system.

Proof of Concept

An attacker could write a script to create a large number of referral codes in a short period of time, potentially causing resource exhaustion or performance issues.
An attacker could create referral codes that they are able to use themselves, potentially leading to abuse of the rewards or incentives associated with the codes.

Tools Used

Recommended Mitigation Steps

To mitigate this vulnerability, access control should be implemented on the ‘createReferralCode’ function. This could involve restricting the function to only be callable by certain addresses or requiring that a certain condition be met before a referral code can be created.
Consider adding limits on the number of referral codes that can be created by a single address to prevent spamming or resource exhaustion.
Consider implementing some kind of validation or verification process for referral codes to ensure that they are being used appropriately.
Regularly review and monitor the system to identify and address any potential abuses of referral codes.


The text was updated successfully, but these errors were encountered:

All reactions