LendingLedger.sol contract can receive ETH but has no withdraw function for it #76
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-47
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-08-verwa/blob/a693b4db05b9e202816346a6f9cada94f28a2698/src/LendingLedger.sol#L209
Vulnerability details
Impact
The
LendingLedger.sol
contract hasreceive
function which ispayable
. If someone sends a transaction withmsg.value != 0
then the ETH will be stuck in the contract forever without a way for anyone to withdraw it.Proof of Concept
receive() external payable {} //@audit there is no way to withdraw the ETH sent to this contract
Recommended Mitigation Steps
Remove the
receive
function since the ETH balance is not used in the contract anyway.Assessed type
Payable
The text was updated successfully, but these errors were encountered: