You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
sherlock-admin3
changed the title
Wonderful Orchid Dove - Should not use of tx.origin track user address
ctf_sec - Should not use of tx.origin track user address
Sep 11, 2024
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
ctf_sec
Medium
Should not use of tx.origin track user address
Summary
the code use tx.origin to track the user address
Vulnerability Detail
example:
https://github.com/sherlock-audit/2024-08-velar-artha/blob/18ef2d8dc0162aca79bd71710f08a3c18c94a36e/gl-sherlock/contracts/core.vy#L241
Impact
multisig wallet has owner alice and bob
alice calls open position using the multisig wallet (genosis safe)
alice calls genosis safe contract calls the velar contract,
while alice expects the user is the safe wallet, alice is tx.origin and she open a position using her own account, not on the safe wallet.
also using tx.origin has other security issue and break all smart contract integration.
https://medium.com/coinmonks/smart-contract-security-tx-origin-authorization-attack-vectors-027730ae601d
and
sherlock-audit/2024-02-optimism-2024-judging#194
Code Snippet
https://github.com/sherlock-audit/2024-08-velar-artha/blob/18ef2d8dc0162aca79bd71710f08a3c18c94a36e/gl-sherlock/contracts/core.vy#L241
Tool used
Manual Review
Recommendation
pass in the original msg.sender inside the core contract instead of tx.origin to track address directly.
Duplicate of #82
The text was updated successfully, but these errors were encountered: