-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AlterDelegatee
signature is weak and can be misused
#159
Comments
MarioPoneder changed the severity to QA (Quality Assurance) |
This previously downgraded issue has been upgraded by MarioPoneder |
MarioPoneder marked the issue as duplicate of #69 |
MarioPoneder marked the issue as not a duplicate |
MarioPoneder marked the issue as duplicate of #205 |
MarioPoneder changed the severity to QA (Quality Assurance) |
MarioPoneder marked the issue as grade-b |
This previously downgraded issue has been upgraded by MarioPoneder |
MarioPoneder marked the issue as satisfactory |
@MarioPoneder Can you please remove the |
Lines of code
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/main/src/UniStaker.sol#L110
Vulnerability details
Impact
The implementation of the
AlterDelegatee
signature in the system is vulnerable due to its weak structure, potentially leading to undesired delegations of voting power. This weakness allows for manipulation that could affect governance proposal outcomes.Proof of Concept
Consider the following scenario:
AlterDelegatee
signature which she sends to Bob.alterDelegateeOnBehalf()
.alterDelegatee()
to do so.This misuse occurs because the signature for
AlterDelegatee
does not specify a deadline or confirm the current delegatee, enabling unintended delegations.Tools Used
Manual Review
Recommended Mitigation Steps
To enhance the security and specificity of the
AlterDelegatee
process, implement the following changes:deadline
parameter to the signature, mirroring the time-bound security found inpermitAndXXX()
methods. This ensures the signature cannot be used after a certain time, preventing delayed misuse.oldDelegatee
address in the signature. This addition requires that any delegation change must explicitly state the transition from the current delegatee to a new one, adding an extra layer of validation and preventing unauthorized changes.Assessed type
Governance
The text was updated successfully, but these errors were encountered: