20,000 USDC
View results
Submission Details
Severity: high
Valid

Loan Lender Can Be Changed Withouth Proper Balance

Summary

The loan lender field can be changhed by an attacker when buiyng the loan due to the missing validation.

Vulnerability Details

In the buyLoan function the loans[loanId].lender is set to msg.sender, howerer, it is not checked if the msg.sender is the new pool (poolId) lender.

Impact

This will allow an attacker to pass any poolId and become the loan lender, which will allow an attacker to start the auction, seize the loan and get collaterals, give the loan to another pool, and in case of loan repayment an attacker will be allowed to withdraw them.

Tools Used

Manual Review

Recommendations

Verify if msg.sender is the new pool lender in the buyLoan.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.