The MultiSigWallet contract lacks proper balance validation before executing transactions. When an approved transaction is executed, the contract attempts to send ETH without first verifying if it has sufficient funds. This can lead to failed transactions and potential denial of service conditions.
The MultiSigWallet contract implements a 2-of-2 multisig wallet where both owners must approve transactions before execution. However, the contract's executeTransaction
function attempts to send ETH without first validating if the contract has sufficient balance to cover the transaction.
Owner submits a transaction for a specific ETH amount
Both owners approve the transaction
executeTransaction
is called without balance validation
If contract balance is insufficient, the transaction reverts after approvals
The transaction remains in a "approved but unexecutable" state
Medium - While no funds can be lost, core functionality can be disrupted
Transactions approved by both owners can fail during execution
Gas is wasted on failed transaction attempts
Contract functionality can be blocked if transactions are queued with amounts exceeding the wallet's balance
Owners must manually track the wallet's balance to ensure transaction viability
The transaction remains in a "approved but unexecutable" state
Manual review
Foundry for POC
Add balance validation before execution:
Add a view function to check transaction executability:
Consider adding balance validation at submission:
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.