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

Winner could be address(0)

Summary

Winner could be address(0)

Vulnerability Details

the winner is selected in the following manner and check if the selected address is address(0) is missing:

address winner = players[winnerIndex];

Further down the function some funds are sent to the winner which could be address(0)
(bool success,) = winner.call{value: prizePool}("");

Impact

Invalid winner could be selected.

Tools Used

Manual review

Recommendations

Do not allow address(0) values to be left in the 'players' array (remove 'refund' function).

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

zero address can win the raffle

Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High

Support

FAQs

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