Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Anyone can call recordVote function for others

Summary

Any user can call recordVote() in veRAACToken.sol for other users

Vulnerability Details

e.g.

Alice can set that Bob has already vote on this proposal

function recordVote(address voter, uint256 proposalId) external {
//@audit malicoius user can call it on behalf of other user
if (_hasVotedOnProposal[voter][proposalId]) revert AlreadyVoted();
_hasVotedOnProposal[voter][proposalId] = true;
uint256 power = getVotingPower(voter);
emit VoteCast(voter, proposalId, power);
}

there is no check if the msg.sender == user

Impact

Malicious users can grief the clients

Tools Used

Recommendations

Make a check if the msg.sender == user if not revert

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

veRAACToken::recordVote lacks access control, allowing anyone to emit fake events

Support

FAQs

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