# Malicious sequencer can DoS proposal execution by inflating the amount of proposals to be pruned

Malicious sequencer spams createProposal to inflate proposal IDs, making _executeProposal's pruning loop run out of gas and DoS governance.

- Payout: Audit contest
- Severity: medium
- Program: Morphl2
- Found by: HaxSecurity
- Disclosed: 2024-08-28
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-morphl2-judging/issues/186
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-morphl2%3AM-10
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:dos vuln:governance

**Target:** Gov.sol governance contract
**Root cause:** _executeProposal loops from undeletedProposalStart to proposalID deleting proposal state; createProposal has no rate limit, so a sequencer can inflate currentProposalID and make the loop unbounded.
**Steps:**
1. Become a sequencer via L1Staking stake + cross-layer registration to L2Staking (or delegation if rewards active).
2. Call `createProposal(ProposalData calldata proposal)` repeatedly with valid rollupEpoch/maxChunks/batch params to inflate `currentProposalID`.
3. Any later `_executeProposal(uint256 proposalID)` iterates `for (i = undeletedProposalStart; i < proposalID; i++)` deleting proposalData/proposalInfos/votes, exceeding block gas limit.
4. Proposal execution reverts OOG, blocking governance parameter updates.
**How found:** Code review of Gov.sol pruning loop and createProposal: noticed undeletedProposalStart only advances on execution and createProposal lacks limits, making loop length attacker-controlled.
**Exploitation:** Sequencer inflates proposal count with cheap createProposal calls; subsequent legitimate proposal execution must prune all inflated IDs in one loop, exhausting gas and reverting, halting governance.
**Insight:** When a cleanup/pruning loop's start pointer only advances on the privileged action it protects, check whether the gap between pointer and current ID can be inflated by a cheaper permissionless-ish action; unbounded iteration = gas griefing DoS.

