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

BaseRate can be update by anyone #198

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

BaseRate can be update by anyone #198

code423n4 opened this issue Jun 21, 2022 · 3 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

There is no access modifier in updateBaseRate due to which, anyone can change Baserate to a very low value an borrow the large value
function updateBaseRate(uint newBaseRatePerYear) public {}

Proof of Concept

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

Tools Used

manual review

Recommended Mitigation Steps

add a access modifier

@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 #22

@tkkwon1998 tkkwon1998 marked this as a duplicate of #22 Jun 22, 2022
@GalloDaSballo
Copy link
Collaborator

Dup of #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

4 participants