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

winner can be the zero address

Summary

In selectWinner() the winner's address is not verified before the prize is sent

Vulnerability Details

If the winner's index is a refunded ticket index, the address stored in the player's table is address(0)

Impact

This can lead to permanent lost of ether and the minted nft

Tools Used

Manual review

Recommendations

Just after retrieving the winner's address and before sending the prize, check if winner != address(0)

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.