The contract does not enforce role‑based access control on selectWinner(). As a result, anyone can trigger winner selection at arbitrary times. This enables attackers to end raffles early, bias RNG outcomes, and compromise governance transparency. The impact is severe, honest players lose funds or fair odds, and the raffle system becomes untrustworthy.
The selectWinner() function is callable by any external account without restrictions. This lack of access control allows malicious actors to prematurely end raffles, manipulate timing of winner selection, and undermine fairness. Critical lifecycle functions should be restricted to trusted roles or governance mechanisms.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
Impact 1
Impact 2
Contract allows anyone to call selectWinner().
No onlyOwner or role‑based modifier is applied.
Attacker waits until raffle has enough players, the execute the code below
Result:
Attacker can prematurely end the raffle before intended duration.
Attacker can repeatedly call selectWinner() to manipulate timing and randomness.
Honest players lose funds or have odds skewed.
Restrict access to selectWinner() using onlyOwner or role‑based modifiers.
Enforce lifecycle checks (raffle duration, minimum players) before allowing execution.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.