Missing ETH call success check -> . ETH may not successfully transfer out and get stuck in the UTBExecutor contract. #340
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
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#L64-L68
Vulnerability details
Impact
ETH may not successfully transfer out and get stuck in the UTBExecutor contract, precisely in the
execute
function.Proof of Concept
In the
execute
function, whenextraNative > 0
the function tries to transfer ETH to thetarget
and if not succeed, then it tries to transfer ETH to therefund
address instead. However, the second transfer to therefund
address does not check for transfer success (missingrequire(success)
). This means that the ETH that was supposed to send to the refund address may not be successfully transferred.This can easily happen when the
refund
address is a contract and did not implement the fallback/receive function properly.Tools Used
Manual Review
Recommended Mitigation Steps
require(success)
check after ETH transfer attempt to therefund
address.Assessed type
ETH-Transfer
The text was updated successfully, but these errors were encountered: