# DAO.execute(bytes32, Action[], uint256) is vulnerable to re-entrancy attacks

Aragon DAO.execute lacks a reentrancy guard, so an action that calls back the caller can re-enter and reorder or duplicate the approved action sequence.

- Payout: Audit contest
- Severity: medium
- Program: Aragon Protocol
- Found by: carlitox477
- Disclosed: 2023-12-12
- Write-up quality: 6/10
- Original: https://code4rena.com/reports/2023-03-aragon#m-04
- Library page: https://bugbountylibrary.com/r/c4%3A2023-03-aragon%3AM-04
- Tags: area:web3 domain:web3 impact:integrity kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:chained vuln:governance vuln:reentrancy

**Target:** DAO.execute(bytes32, Action[], uint256) governance executor
**Root cause:** execute() has no nonReentrant guard; if one action calls back the msg.sender (or triggers an ERC-777/safeMint callback to the executor), that address can re-enter execute() and run the action array again mid-sequence.
**Steps:**
1. DAO grants EXECUTE_PERMISSION to contract DAOsWilling holding an ordered 5-action sequence.
2. Bob calls DAOsWilling.executeDaosWilling() from his contract.
3. Action 3 performs a callback to Bob's contract, which calls executeDaosWilling() again.
4. The full 1-5 sequence runs nested, then actions 4 and 5 of the outer call execute, breaking the required order.
5. Alternatively an ERC-777 transfer or NFT safeMint to the executor in an action re-enters and mints twice.
**How found:** Read docs noting action order is critical (install TokenVoting before uninstall Multisig) and observed execute() lacks a reentrancy guard, then reasoned that any action calling back msg.sender re-enters.
**Exploitation:** Attacker must be the caller of a contract that holds EXECUTE_PERMISSION and whose approved action array contains a callback to the caller (direct call, ERC-777 hook, or safeMint). Re-entering execute() replays the sequence, duplicating effects like NFT mints or reordering install/uninstall plugin actions.
**Escalation:** Chaining an indirect callback (ERC-777 transfer or NFT safeMint as participation reward) turns an innocuous action into a reentrancy vector without an explicit self-call.
**Insight:** Governance batch executors that promise ordered atomic actions need reentrancy guards even when permissioned, because token hooks (ERC-777, ERC-721 safeMint) inside an action silently call back the executor.

