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

A non-existent player can be the winner.

Summary

It is possible that the winner-determination algorithm will select the index of a player who has already withdrawn by making a refund. In other words, a zero address may become the winner.

Vulnerability Details

The selectWinner function performs the validation that players.length >= 4. However, the index of the player withdrawn by refund is assigned a zero address, so the withdrawn player is included in this (since the length of the array does not change). Thus, the zero address could be the winner.

Impact

Zero address would be the winner.

Tools Used

Manual

Recommendations

When redund, also reduce the length of the players array

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year 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.