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

Anyone can update baseRatePerYear #123

Closed
code423n4 opened this issue Jun 21, 2022 · 2 comments
Closed

Anyone can update baseRatePerYear #123

code423n4 opened this issue Jun 21, 2022 · 2 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/Plex-Engineer/lending-market/blob/755424c1f9ab3f9f0408443e6606f94e4f08a990/contracts/NoteInterest.sol#L118

Vulnerability details

Impact

In NoteRateModel, the function updateBaseRate has no access control. Therefore anyone could potentially call it and set baseRatePerYear to an incorrect value, to extract funds from borrowers or drop borrowing cost for an attack.

Proof of Concept

An attacker could set baseRatePerYear to an arbitrarily high value close to max uint, which would lead to all Notes borrowers paying extremely high interests and losing funds before the admin could react.

Recommended Mitigation Steps

Add a whitelisting requirement or an admin privilege for this function.

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Jun 21, 2022
code423n4 added a commit that referenced this issue Jun 21, 2022
@ecmendenhall
Copy link

Duplicate of #22

@tkkwon1998 tkkwon1998 added the duplicate This issue or pull request already exists label Jun 22, 2022
@tkkwon1998
Copy link
Collaborator

Duplicate of issue #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants