The recordVote function permits any external account to record a vote on behalf of any voter address. This vulnerability destroys the integrity of the voting process and undermines the authentication guarantees of the governance mechanism.
The recordVote function accepts a voter address and a proposal ID, then marks the voter as having voted without verifying that the caller is the voter or an authorized entity. This breaks the security guarantee that only the legitimate voter can cast their vote, allowing an attacker to record a vote for any user and prevent them from voting. An attacker invokes recordVote with a target voter’s address and a proposal ID; the function updates the internal state to indicate that the target voter has voted, and an event is emitted with the attacker's input, thereby disrupting the intended voting process.
This vulnerability has a High impact because it compromises the integrity of the voting system. An attacker exploits this vulnerability in a straightforward manner using the function’s existing path and prevents targeted voters from casting their legitimate votes. The flaw occurs deterministically every time the function is called with an unauthorized voter address.
Manual Review
Enforce access control to ensure only the legitimate voter or an authorized entity can call recordVote. One solution is to modify the function to verify msg.sender matches the voter parameter.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.