Skip to content
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

Real Glossy Rhino - Anyone can Withdraw staked tokens from an existing deposit on behalf of a user via withdrawOnBehalf #95

Open
sherlock-admin2 opened this issue Dec 22, 2024 · 0 comments
Labels
Won't Fix The sponsor confirmed this issue will not be fixed

Comments

@sherlock-admin2
Copy link

Real Glossy Rhino

Medium

Anyone can Withdraw staked tokens from an existing deposit on behalf of a user via withdrawOnBehalf

Summary

The withdrawOnBehalf function allows anyone to withdraw staked tokens on behalf of a user (_depositor) if they possess a valid _signature. However, the function lacks proper validation to restrict the caller (msg.sender) from initiating withdrawals unless they are authorized by the depositor. This creates a critical vulnerability as malicious actors can exploit valid signatures to withdraw funds from deposits without the user’s consent.

Vulnerability Detail

Impact

Anyone with access to a valid _signature can withdraw funds from deposits without the user’s consent.

Code Snippet

https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/extensions/GovernanceStakerOnBehalf.sol#L218-L241

Tool used

Manual Review, Foundry

Recommendation

Only deposit.owner or deposit.claimer should be able to call withdrawOnBehalf

@sherlock-admin3 sherlock-admin3 added the Won't Fix The sponsor confirmed this issue will not be fixed label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Fix The sponsor confirmed this issue will not be fixed
Projects
None yet
Development

No branches or pull requests

2 participants