Link to Affected Code:
Description:
The recordVote
function lacks access control mechanisms, allowing any address to record votes on behalf of other users. This enables malicious actors to mark legitimate voters as having already voted before they can actually cast their vote, effectively censoring their voting power.
Impact:
Voter censorship through preemptive vote recording
Manipulation of governance outcomes by blocking strategic voters
No way for legitimate voters to override the griefing
Proof of Concept:
It can happen following this steps:
An attacker calls the the recordVote
function with address they want to grief
The function passes because there is no access control and the function set _hasVotedOnProposal[voter][proposalId] = true;
When a legitimate user that was griefed tries to vote , this call reverts if (_hasVotedOnProposal[voter][proposalId]) revert AlreadyVoted();
So they cant vote for a proposal because it was recorded in the system that they already voted!
Recommended Mitigation:
Add msg.sender validation:
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.