Original vulnerabilities:
addNewTranche() modifies borrower’s principal by adding new tranches. However, this function is not access-controlled and it only requires the signature of the lender.
Original impacts:
This puts the borrower at risk because a lender can add a tranche to an existing loan to increase the principalAmount and specific high apr or renegotiation offer fees for the borrower to pay.
Lines of code
Vulnerability details
C4 Issue
H-12: addNewTranche() no authorization from borrower
Comments
Original vulnerabilities:
addNewTranche()
modifies borrower’s principal by adding new tranches. However, this function is not access-controlled and it only requires the signature of the lender.Original impacts: This puts the borrower at risk because a lender can add a tranche to an existing loan to increase the principalAmount and specific high apr or renegotiation offer fees for the borrower to pay.
Mitigation
Fix: https://github.com/pixeldaogg/florida-contracts/pull/379/files
The mitigation is checking the msg.sender is the loan borrower themselves such that only the borrower can make such changes to their loan.
The mitigation eliminates the original vulnerability and resolves the issue.
Test
The revised test is passing
Conclusion
LGTM