Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

selectWinner() is not ownable, prone to manipulations

Summary

selectWinner() can be called by anyone.

Vulnerability Details

As anyone can call selectWinner() and because of the issues with random number generation it's possible to manipulate with the list of players. The the attacker could add addresses until (one of) his addresses will have the winnerIndex. After that the attacker could call selectWinner() and take funds.

Impact

High. Allows to easily commit fraud.

Tools Used

Manual check.

Recommendations

  • Use onlyOwner modifier.

  • Use verified source of randomness, e.g. Chainlink VRF.

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: User experience and design improvement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.