Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

B353N - Exploitable Loan Modification in Cooler.sol #106

Closed
sherlock-admin opened this issue Aug 28, 2023 · 0 comments
Closed

B353N - Exploitable Loan Modification in Cooler.sol #106

sherlock-admin opened this issue Aug 28, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Aug 28, 2023

B353N

false

Exploitable Loan Modification in Cooler.sol

Summary

This comprehensive security review identifies a critical vulnerability within the Cooler.sol smart contract. The flaw permits a malicious lender to manipulate loan conditions by utilizing the provideNewTermsForRoll function. Subsequently, due to the absence of proper access control in the rollLoan function, the attacker can execute a loan rollover with substantially elevated interest rates.

The vulnerability unfolds in two distinct stages. Initially, the malicious lender invokes the provideNewTermsForRoll function, which allows them to tamper with the loan's interest rate and its duration. Notably, these alterations can involve setting excessively high interest rates or significantly reducing the loan duration. Following this, the absence of robust access control in the rollLoan function permits the malicious lender to execute a loan rollover with the manipulated terms, effectively imposing unfavorable conditions on the borrower.

Impact

The potential consequences of this vulnerability are substantial. Borrowers face the risk of financial loss due to the imposition of disadvantageous terms on their loans. As malicious lenders exploit the vulnerability to modify interest rates and loan durations, borrowers could experience severe financial setbacks.

Code Snippet

https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L192-L217

Tool used

Manual Review

Recommendation

To mitingate this issue add access control on rollLoan function to can be called only by owner()

iif (msg.sender != owner()) revert OnlyApproved();

Duplicate of #26

@github-actions github-actions bot closed this as completed Sep 1, 2023
@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Sep 1, 2023
@sherlock-admin2 sherlock-admin2 changed the title Recumbent Syrup Cod - Exploitable Loan Modification in Cooler.sol B353N - Exploitable Loan Modification in Cooler.sol Sep 12, 2023
@sherlock-admin2 sherlock-admin2 added the Reward A payout will be made for this issue label Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

2 participants