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

Use of tx.origin for authentication #122

Open
code423n4 opened this issue Jul 10, 2021 · 2 comments
Open

Use of tx.origin for authentication #122

code423n4 opened this issue Jul 10, 2021 · 2 comments
Labels
1 (Low Risk) bug Something isn't working

Comments

@code423n4
Copy link
Contributor

Handle

shw

Vulnerability details

Impact

The eoaOnly function of Controller checks whether the user is whitelisted using tx.origin. Using tx.origin to authenticate users is generally not a good practice since it can be abused by malicious contracts when whitelisted users are interacting with them. Users have to be very careful to avoid being impersonated when interacting with contracts from other protocols, which could unnecessarily burden users.

Proof of Concept

Referenced code:
Controller.sol#L269

Please refer to the following link for more discussion on tx.origin:
Solidity issue - Remove tx.origin

Recommended Mitigation Steps

Change tx.origin at line 269 to msg.sender to ensure that the entity calling the Controller is the one allowed.

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels Jul 10, 2021
code423n4 added a commit that referenced this issue Jul 10, 2021
@kitty-the-kat kitty-the-kat added the duplicate This issue or pull request already exists label Jul 14, 2021
@kitty-the-kat
Copy link
Collaborator

#52

@ghoul-sol
Copy link
Collaborator

This issue touches on different problem so I'll keep it as stand-alone low risk issue.

@ghoul-sol ghoul-sol removed the duplicate This issue or pull request already exists label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants