Use of unchecked low level calls #388
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-25
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/main/src/UTBExecutor.sol#L41
Vulnerability details
In the
UTBExecutor
contract, theexecute
function performs external calls using the low-levelcall
method, which can be unsafe, especially if return values are not checked:Impact
The lack of return value checks for the
call
method means that the contract cannot ascertain whether the external call was successful. This could lead to unhandled failures in execution.The
call
method can also expose the contract to reentrancy attacks, as it allows the called contract to execute arbitrary code.If the external call fails but the contract does not handle this failure, funds sent with the call may be lost or locked.
Mitigation
To address these risks, consider the following modifications:
call
method to ensure the external call was successful.call
, consider using higher-level abstractions provided by Solidity (liketransfer
orsend
for Ether transfers, or directly calling known functions on the target contract).Assessed type
call/delegatecall
The text was updated successfully, but these errors were encountered: