Voter in VoteEscrowCore can permanently lock user tokens
A malicious voter can call voting() or attach() to increase a token's attachments or set its voted status, preventing withdrawal, merge, or transfer. This locks the user's tokens in the contract indefinitely.
Submitted by scaraven
A malicious voter can arbitrarily increase the number of attachments or set the voted status of a token to true. This prevents the token from being withdrawn, merged or transfered thereby locking the tokens into the contract for as long as the voter would like.
I submitted this is as a medium severity because it has external circumstances (a malicious voter) however has a very high impact if it does occur.
Proof of Concept
- A user creates a lock for their token and deposits it into the VoteEscrowDelegate/Core contract.
- The malicious voter then calls either
voting()orattach()thereby preventing the user withdrawing their token after the locked time bypasses
Tools Used
VS Code
Recommended Mitigation Steps
I have not seen any use of voting() or attach() in any of the other contracts so it may be sensible to remove those functions altogether. On the other hand, setting voter to be smart contract which is not malicious offsets this problem.
Removed Voter: https://github.com/golom-protocol/contracts/commit/03572010ef868597310f4736c91aacf3aa044ce9
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the voting() and attach() functions lack access control, allowing any voter to modify a token's state and block its withdrawal.
Impact
A malicious voter can permanently lock a user's tokens, preventing withdrawal, merge, or transfer.
What the attacker needed
A malicious voter; user has locked tokens
The fix
The project removed the Voter functionality to fix the issue.
How it was found
- A user creates a lock for their token and deposits it into the VoteEscrowDelegate/Core contract.
- The malicious voter calls either voting() or attach(), preventing the user from withdrawing their token after the lock time expires.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this voting contract, a voter can mark a token as 'voted' or add attachments. If a voter is malicious, they can do this to someone else's token, and the contract then refuses to let the owner withdraw or transfer it. So the owner's tokens get stuck.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.