You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Anyone can roll the loan on behalf of the borrower increasing the debt
Summary
Depending on the roll conditions it may be possible to roll the loan without having to add more collateral and just increase the debt for the borrower. This attack can be easily implemented by the lender themselves.
Vulnerability Detail
Rolling a loan is permissionless. Under normal conditions it requires providing more collateral so it is usually not in the interest of anyone other than the borrower. However, if loanToCollateral changes for the roll, then newCollateral may be 0. This case is handled in code.
if (newCollateral >0) {
collateral().safeTransferFrom(msg.sender, address(this), newCollateral);
}
However, rolling will still increase the debt of the loan
sherlock-admin
changed the title
Large Rainbow Squirrel - Anyone can roll the loan on behalf of the borrower increasing the debt
libratus - Anyone can roll the loan on behalf of the borrower increasing the debt
Sep 12, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
libratus
high
Anyone can roll the loan on behalf of the borrower increasing the debt
Summary
Depending on the roll conditions it may be possible to roll the loan without having to add more collateral and just increase the debt for the borrower. This attack can be easily implemented by the lender themselves.
Vulnerability Detail
Rolling a loan is permissionless. Under normal conditions it requires providing more collateral so it is usually not in the interest of anyone other than the borrower. However, if loanToCollateral changes for the roll, then newCollateral may be 0. This case is handled in code.
However, rolling will still increase the debt of the loan
Increasing the debt can be in the interest of the lender, so lender can set up this scenario and force the borrower to pay more debt.
PoC
Impact
Lender can increase borrower's debt forcing a default.
Code Snippet
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L192
Tool used
Manual Review
Recommendation
The safest option is to only allow rolling a loan by the borrower
Duplicate of #26
The text was updated successfully, but these errors were encountered: