In the RankedChoice
smart contract due to an incorrect TYPEHASH
used in the rankCandidatesBySig
function. The TYPEHASH
is defined for uint256[] instead of the correct address[]. This discrepancy leads to a mismatch in the signature verification process, allowing an attacker to potentially bypass verification or causing legitimate voters to be rejected.
The contract incorrectly defines the TYPEHASH
as keccak256("rankCandidates(uint256[])"), even though the function rankCandidatesBySig expects an address[] for the orderedCandidates argument.
The vulnerability arises during the signature recovery process in rankCandidatesBySig
. Since the TYPEHASH
is designed for address[]
but the function passes [uint256]
, the generated struct hash will be incorrect. Consequently, the recovered signer address will not match the expected value.
The incorrect TYPEHASH
leads to the following potential issues:
Signature Verification Failure
Bypassing Voter Authentication
Denial of Service
Manual Review
Change the TYPEHASH
to reflect the correct address[]
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.