-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTBExector
contract tokens balance could be fully drained
#650
Comments
raymondfam marked the issue as sufficient quality report |
raymondfam marked the issue as duplicate of #15 |
Fund Accumulation: Other than the UTBFeeCollector, and DcntEth, the contracts are not intended to hold on to any funds or unnecessary approvals. Any native value or erc20 flowing through the protocol should either get delivered or refunded. |
raymondfam marked the issue as insufficient quality report |
alex-ppg marked the issue as not a duplicate |
The |
alex-ppg marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L134-L162
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L108-L124
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L311-L319
Vulnerability details
Impact
A high-severity bug has been identified within the contract
UTB
's private function_swapAndExecute
:The vulnerability arises from inadequate input validation in the functions calling _swapAndExecute, specifically swapAndExecute and receiveFromBridge. The unchecked inputs are subsequently utilized in the
UTBExecutor
contract's execute function, posing a significant risk.An attacker could exploit this flaw to execute arbitrary commands, potentially leading to the unauthorized transfer of ERC20 tokens from the executor contract balance.
Proof of Concept
receiveFromBridge
orswapAndExecute
) with the manipulated input crafted aboveUTBExecutor
that could be immediately sold after that resulting in profit for the attacker and loss of funds for the protocol usersTools Used
manual review
Recommended Mitigation Steps
To address this vulnerability, implement comprehensive input validation within the
_swapAndExecute
function. Verify the integrity of inputs such astarget
andpayload
in bothswapAndExecute
andreceiveFromBridge
functions before invoking_swapAndExecute
. Additionally, consider incorporating access controls and restrictions within theUTBExecutor
'sexecute
function to ensure secure execution of commands.Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: