Submitted by rayn
When an attacker (borrower) proposes a new term, the attacker can let a lender accept the malicious term which the lender doesnt expect.
It uses delegatecall in _acceptNewTerms of MapleLoanInternals.sol. Though a lender can manually check refinancer contract before calling acceptNewTerms, the attacker (borrower) can still re-create a malicious contract on same address before the lender is calling acceptNewTerms, and trigger malicious code by delegatecall in _acceptNewTerms.
In summary, an attacker can use CREATE2 to re-create a new malicious contract on same address. Here is CREATE2 exploit example: https://x9453.github.io/2020/01/04/Balsn-CTF-2019-Creativity/
ethers.js
Also check refinancer contract bytecodes in _getRefinanceCommitment:
lucas-manuel (Maple Finance) disputed and commented:
LSDan (judge) commented:
lucas-manuel (Maple Finance) disagreed with High severity and commented:
LSDan (judge) decreased severity to Medium and commented:
For this contest, 8 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by warden IllIllI received the top score from the judge.
The following wardens also submitted reports: WatchPug, defsec, gzeon, CertoraInc, berndartmueller, cccz, and robee.
