Description:
The function MultiSigWallet::executeTransaction(uint256 _txId)
allows the execution of approved transactions from a multisig wallet. However, there is no validation at the time of transaction creation to ensure that the requested value
does not exceed the available funds in the multisig wallet. This can result in transactions being approved but failing at the execution stage due to insufficient funds.
Impact:
Transactions that exceed the wallet’s balance will fail upon execution, leading to unnecessary transaction approvals and wasted gas costs.
Users may approve transactions assuming they will be executed successfully, only to encounter execution failures.
This could result in an inefficient user experience and additional operational overhead in reattempting transactions with adjusted values.
Proof of Concept:
Assume the multisig wallet has 3 ETH in balance.
A transaction is created with txn.value = 5 ETH
.
The transaction gets approved by both owners.
When calling executeTransaction(_txId)
, it reaches the following line:
It will revert, as the value is greater than the multisig's funds.
Recommended Mitigation:
Add a validation check at the moment of transaction creation to prevent transactions with a value greater than the available balance in the multisig wallet.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.