20,000 USDC
View results
Submission Details
Severity: medium

unbounded loops may lead to DOS attack

Summary

In borrow and repay function, there is no bound for loops, attacker may call the function with long lists of data which may result in DOS

Vulnerability Details

https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Lender.sol#L233
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Lender.sol#L293
no limitation for loops is risky

Impact

If the gas limit is reached, this transaction will fail or revert

Tools Used

Manual Review

Recommendations

set a limitation for the loop, such as iteration numbers cap

Support

FAQs

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