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

`buyLoan()`does not check if `pool.loanToken == loan.loanToken`

Summary

buyLoan()does not check if pool.loanToken == loan.loanToken. Attacker can set a fake pool and a fake pool.loanToken and then call the buyLoan() to steal the loan.It will cause user lossing funds.

Vulnerability Details

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L465

Impact

It will cause user lossing funds.And attacker does not need pay more funds.

Tools Used

manual

Recommendations

check if pool.loanToken == loan.loanToken

Support

FAQs

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