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

Winner can be address(0)

Summary

Winner can be address(0)

Vulnerability Details

  1. enterRaffle() does not check individual accounts in passed in array are not address(0)

  2. If an account claims refund the index is zeroed out to address(0) however this index is still eligible for being selected as the index for winner

Impact

Selected winner can be address(0). Funds are sent to address which will succeed due to low level call as if an actual winner won something when there is no winner

Tools Used

Manual Analysis

Recommendations

Ensure checks in enterRaffle that address(0) is not allowed
Ensure checks after refund that zeroed out index can no longe be selected as winner

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 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.

Give us feedback!