The executeTransaction function is vulnerable to reentrancy attacks because it calls an external address without using a reentrancy guard.
The attacker can take following steps to exploit this vulnerability:
Malicious Contract: The attacker deploys a malicious contract that reenters the executeTransaction function.
3.Deploy the MultiSigWallet and CAttacker contract
3.Fund the MultiSigWallet: fundthe MultiSigWallet contract with some ETH.
4.Submit and Approve a Transaction: Submit and approve a transaction from the MultiSigWallet to the CAttacker contract.
5.Execute the CAttack: The attacker calls the Cattack function on the CAttacker contract, which triggers the reentrancy attack
An attacker could exploit this vulnerability by creating a malicious contract that reenters the executeTransaction function, potentially allowing them to drain the wallet.
None
To fix this vulnerability, we should add a reentrancy guard to the executeTransaction function. We can use OpenZeppelin's ReentrancyGuard for this purpose.
Here is the updated executeTransaction function.
matchRewards: Contract is created just before and is the one called. No impact. executeTransaction: CEI is followed. Emitting an event in disorder is informational in that context. withdraw: CEI is followed.
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.