This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
0x52 - Funding#requestWithdraw uses incorrect withdraw address #53
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
Comments
github-actions
bot
added
Medium
A valid Medium severity issue
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
labels
Jan 22, 2024
This was referenced Jan 22, 2024
1 comment(s) were left on this issue during the judging contest. takarez commented:
|
JoscelynFarr
added
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
labels
Jan 23, 2024
JoscelynFarr
pushed a commit
to JOJOexchange/smart-contract-EVM
that referenced
this issue
Jan 26, 2024
sherlock-admin
changed the title
Hot Infrared Starling - Funding#requestWithdraw uses incorrect withdraw address
0x52 - Funding#requestWithdraw uses incorrect withdraw address
Jan 27, 2024
@nevillehuang do you believe this has enough impact to be considered valid? |
Fixed PR: JOJOexchange/smart-contract-EVM@82b5c85 |
Fix looks good. Now uses from instead of msg.sender |
coin96
pushed a commit
to coin96/smart-contract-EVM
that referenced
this issue
Apr 29, 2024
Tvenus
added a commit
to Tvenus/smart-contract-EVM
that referenced
this issue
May 27, 2024
Omokami
added a commit
to Omokami/smart-contract-EVM
that referenced
this issue
May 30, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
0x52
medium
Funding#requestWithdraw uses incorrect withdraw address
Summary
When requesting a withdraw,
msg.sender
is used in place of thefrom
address. This means that withdraws cannot be initiated on behalf of other users. This will break integrations that depend on this functionality leading to irretrievable funds.Vulnerability Detail
Funding.sol#L69-L82
As shown above the withdraw is accidentally queue to
msg.sender
NOT thefrom
address. This means that all withdraws started on behalf of another user will actually trigger a withdraw from theoperator
. The result is that withdraw cannot be initiated on behalf of other users, even if the allowance is set properly, leading to irretrievable fundsImpact
Requesting withdraws for other users is broken and strands funds
Code Snippet
Funding.sol#L69-L82
Tool used
Manual Review
Recommendation
Change all occurrences of
msg.sender
in stage changes tofrom
instead.The text was updated successfully, but these errors were encountered: