DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing Reentrancy Guard

Vulnerability Details

The executeTransaction function in Multisig.sol transfers ETH to an external address (payable(txn.to).call{value: txn.value}("");) without using a reentrancy guard.

Impact

  • A malicious recipient could exploit reentrancy by calling back into the contract during the transfer, potentially draining funds or causing unexpected behavior.

Tools Used

install OpenZeppelin Contracts library

forge install OpenZeppelin/openzeppelin-contracts --no-commit

Recommendations

Mark executeTransaction as non-reentrant using ReentrancyGuard from OpenZeppelin's library.

How to do this:

add this in foundry.toml:

remappings = ['@openzeppelin/contracts=lib/openzeppelin-contracts/contracts']

import this at top of your MultiSig.sol
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

Update the contract declaration to inherit from ReentrancyGuard:

contract MultiSigWallet is ReentrancyGuard {

Use OpenZeppelin's ReentrancyGuard to protect the executeTransaction function:

function executeTransaction(uint256 _txId) external onlyOwners nonReentrant {
// Existing logic
}

Updates

Appeal created

n0kto Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

invalid_reentrancy_with_no_impact

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.