-
Notifications
You must be signed in to change notification settings - Fork 5
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
bughuntoor - Usage of tx.origin
to determine the user is prone to attacks
#82
Comments
tx.origin
to determine the user is prone to attackstx.origin
to determine the user is prone to attacks
Escalate Noticed there were 19 escalations on preliminary valid issues. This is final escalation to make it 20/20 🙂 |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Planning to reject the escalation and leave the issue as it is. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
bughuntoor
High
Usage of
tx.origin
to determine the user is prone to attacksSummary
Usage of
tx.origin
to determine the user is prone to attacksVulnerability Detail
Within
core.vy
to user on whose behalf it is called is fetched by usingtx.origin
.This is dangerous, as any time a user calls/ interacts with an unverified contract, or a contract which can change implementation, they're put under risk, as the contract can make a call to
api.vy
and act on user's behalf.Usage of
tx.origin
would also break compatibility with Account Abstract wallets.Impact
Any time a user calls any contract on the BOB chain, they risk getting their funds lost.
Incompatible with AA wallets.
Code Snippet
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L166
Tool used
Manual Review
Recommendation
Instead of using
tx.origin
incore.vy
, simply passmsg.sender
as a parameter fromapi.vy
The text was updated successfully, but these errors were encountered: