A user can buy a loan on behalf of another pool.
Upon calling buyLoan, the user specifies on behalf of which pool the loan to be bought of. The problem is that there isn't a check that msg.sender is the pool.lender and loan.lender is set to msg.sender instead of pool.lender
What a user can do to profit is the following:
Find a auctioned loan.
Call buyLoan with another lender's suitable poolId.
Now that loan.lender is the malicious user, they can find a suitable pool to giveLoan to it.
By doing so they'll be credited funds to their own pool.
The user can then withdraw the funds
User can steal funds from other pools.
Manual review
Add a check that msg.sender == pool.lender
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.