President Elector

First Flight #24
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

No Check for address(0) in Ordered Candidates

Summary

A voter is able to submit ordered candidates containing address(0).

Vulnerability Details

If a majority of the voters collude they can submit an orderedCandidates with address(0) as their preferred candidate.

Impact

This will result in the selection of address(0) as the next president which will remain in effect for the entire four year period until the next election.

Tools Used

Forge test

Recommendations

Add the following check to _rankCandidates():

if(_isInArray(orderedCandidates, address(0))) {
revert RankedChoice_InvalidInput();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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