Skip to content
Access control Audit finding Advanced

Supplemental Technical Correction for Report #76106: Improper L1-Head Binding in AggregateVerifier Initial Proof Verification Can Finalize an Invalid State Root on L1

The AggregateVerifier contract accepted an initial TEE or ZK proof bound to a prover-chosen recent L1 head rather than the dispute game's stored l1Head, so a proof for a stale L1 view could initialise and resolve a game. With a proof threshold of one, this could finalise an L2 output root on L1 that was never proven for the game's actual L1 context.

Singapore_Lion Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

76321 sc medium supplemental technical correction for report 76106 improper l1 head binding in aggregateverifier initial proof verification can finalize an invalid state root on l1

Submitted on May 3rd 2026 at 20:38:40 UTC by @Singapore_Lion for Audit Comp | Base Azul

  • Report ID: #76321
  • Report Type: Smart Contract
  • Report severity: Medium
  • Target: https://github.com/base/contracts/tree/v8.1.0/src/multiproof
  • Impacts:
    • Forging or bypassing TEE or ZK proof verification in AggregateVerifier to finalize an invalid state root on L1
    • Circumventing the dispute/challenge mechanism to prevent correction of an invalid proposal before finalization
    • Forcing a dispute game into an incorrect resolved state (e.g., DEFENDER_WINS when CHALLENGER_WINS should apply, or vice versa)

Description

Submission Note

This submission is a supplemental technical correction for previously closed Base Azul Audit Competition Report #76106.

It is being submitted separately only because the original report is closed, the mediation UI says mediation is unavailable, and Immunefi Support has not responded before the competition deadline.

If possible, please merge this evidence into Report #76106 and reassess that report rather than treating this as an unrelated new finding.

The project closed Report #76106 as "intended" with the following rationale:

The L1 head is to ensure that blob data was acquired from an actual L1 block.
It does not matter which L1 block was used. As long as proofs attest to the correct
L2 block number and state root, the L1 head is irrelevant.

The new supplemental Base action-harness PoC below directly disproves that closure premise. Base's own derivation harness shows that different L1 heads can produce different L2 safe heads when batch data exists between those L1 heads. Therefore, l1_head is not irrelevant metadata; it bounds the L1 data view used by derivation.

I also added focused proof-client tests for the ZK/Succinct path. These tests show that when the L1 data source is exhausted before the requested target, the proof-client derivation helper can return the current safe head as success, while the SP1 public-value struct still commits the requested claimed_l2_block_number. This is supplemental evidence against the statement that the L1 head is irrelevant as long as the proof attests a block number and state root.

Brief / Intro

AggregateVerifier.initializeWithInitData() accepts an initial TEE or ZK proof whose public input is bound to a prover-chosen recent L1 head, instead of requiring that proof to be bound to the dispute game's stored l1Head(). As a result, a valid proof for L1 head H_stale can initialize a game whose immutable game context is H_game = blockhash(block.number - 1). With PROOF_THRESHOLD = 1, this single mismatched proof is enough for the game to resolve and update AnchorStateRegistry, meaning the protocol can finalize an L2 output root on L1 that was never proven for the game's actual L1 context.

Vulnerability Details

Why this report is about a real production smart-contract bug

This report is not claiming forged cryptography, leaked keys, or a test-only issue.

It is about a production on-chain verification bug in AggregateVerifier.sol: the contract builds the initial proof journal using a proof-supplied L1 head, even though the dispute game itself already has an immutable stored L1 head. The vulnerable entrypoint is the public game creation path DisputeGameFactory.createWithInitData(), so the issue is reachable without admin privileges and is inside the in-scope implementation contracts.

The PoC therefore does not need to break SP1, RISC0, or Nitro signatures. It only needs to show the security-relevant contract behavior: AggregateVerifier passes the wrong journal context into the cryptographic verifier and then treats that proof as valid for the game.

No code comment, deployment note, or protocol documentation describes this mismatch as an intentional temporary compatibility behavior. The documented proof flow instead treats the dispute game's stored l1Head() as the binding game context for proof verification.

Broken Invariant

For a dispute game with stored l1Head() == H_game, every proof accepted by that game must be bound to H_game.

initializeWithInitData() violates this invariant because it verifies the initial proof against l1OriginHash parsed from proof calldata, while the game stores a separate immutable l1Head().

Root cause

The root cause is a public-input / contract-state binding mismatch in AggregateVerifier.

DisputeGameFactory stores the dispute game's L1 head at creation time as the parent block hash:

Solidity
bytes32 parentHash = blockhash(block.number - 1);
proxy_ = IDisputeGame(address(impl).clone(abi.encodePacked(msg.sender, _rootClaim, parentHash, _extraData)));

However, AggregateVerifier.initializeWithInitData() does not bind the initial proof to that stored l1Head(). Instead, it parses a proof-supplied L1 origin directly from calldata:

Solidity
ProofType proofType = ProofType(uint8(proof[0]));

bytes32 l1OriginHash = bytes32(proof[1:33]);
uint256 l1OriginNumber = uint256(bytes32(proof[33:65]));
_verifyL1Origin(l1OriginHash, l1OriginNumber);

_verifyProof(
    proof[65:],
    proofType,
    gameCreator(),
    l1OriginHash,
    startingOutputRoot.root.raw(),
    uint64(startingOutputRoot.l2SequenceNumber),
    rootClaim().raw(),
    uint64(l2SequenceNumber()),
    intermediateOutputRoots()
);

_verifyL1Origin() only checks that l1OriginHash matches a recent canonical L1 block hash. It does not require l1OriginHash == l1Head().raw().

That is inconsistent with the later proof path in the same contract. verifyProposalProof() binds subsequent proofs to the stored game L1 head:

Solidity
_verifyProof(
    proofBytes[1:],
    proofType,
    msg.sender,
    l1Head().raw(),
    startingOutputRoot.root.raw(),
    uint64(startingOutputRoot.l2SequenceNumber),
    rootClaim().raw(),
    uint64(l2SequenceNumber()),
    intermediateOutputRoots()
);

The TEE and ZK verifiers both receive a journal digest that includes the chosen L1 head:

Solidity
bytes32 journal = keccak256(
    abi.encodePacked(
        proposer,
        l1OriginHash,
        startingRoot,
        startingL2SequenceNumber,
        endingRoot,
        endingL2SequenceNumber,
        intermediateRoots,
        CONFIG_HASH,
        TEE_IMAGE_HASH // or ZK_RANGE_HASH
    )
);

So the contract is not merely storing inconsistent metadata. It is actually asking the cryptographic verifier to validate the proof for H_stale, then recording that proof as the accepted initial proof for a game whose immutable L1 context is H_game.

Why the L1 head is security-critical

This matters because Base's proof pipeline treats l1_head as trust-critical derivation context:

  • Base's fault-proof specification states that l1_head is the L1 block hash perceived as the tip of the L1 chain, and that no later L1 data is available to the proof program.
  • The proof client constructs OracleL1ChainProvider::new(boot.l1_head, ...), so derivation is parameterized by that head.
  • OracleL1ChainProvider starts header traversal from self.l1_head and rejects by-number queries above that header with BlockNumberPastHead.
  • The prover request model carries an optional pinned l1_head; the service validates it, stores it with the proof request, and passes it into witness generation.
  • The ZK boot/public values include l1Head, and the aggregation program commits l1Head into the final aggregation output digest.
  • The Nitro enclave derives l1_origin_hash from boot_info.l1_head and includes it in the signed ProofJournal.
  • Base's proof docs and proof encoder explicitly treat the game's stored l1Head() as the L1 context for verifyProposalProof(), challenge(), and nullify().

That means the proof statement is effectively: "this output root is valid under this L1 head." The contract bug changes the accepted on-chain statement into: "this output root is valid under some recent L1 head chosen by the prover, but it will be treated as a proof for the game's stored L1 head."

This last point is important for the closure rationale. Base's own docs say that verifyProposalProof(proofBytes) does not re-read a new L1 origin from calldata and instead uses the l1Head() captured by the factory at clone creation. The proof encoder says the compact proof bytes for AggregateVerifier.nullify(), challenge(), and verifyProposalProof() omit l1OriginHash and l1OriginNumber because those entrypoints already have l1Head stored in CWIA. In other words, the documented non-initial proof flow already assumes the L1 head is the stored game context, not arbitrary irrelevant metadata.

Supplemental evidence: Base action-harness disproves that l1_head is irrelevant

After Report #76106 was closed, I created an additional Base action-harness test to directly test the project's closure rationale.

The test uses Base's own derivation/action harness and shows that two derivation runs with the same starting state and the same sequencer-built L2 block produce different L2 safe heads when the L1 view is capped at different L1 heads:

  1. H_stale: the L1 view is capped at genesis, before the L1 block containing the batch data.
  2. H_game: the L1 view includes L1 block 1, which contains the batch data for the same sequencer-built L2 block.
  3. Under H_stale, derivation cannot see the batch-bearing L1 block and remains at L2 genesis.
  4. Under H_game, derivation sees the batch-bearing L1 block and derives L2 block 1.
  5. The resulting L2 safe heads differ.

This directly contradicts the closure claim that "it does not matter which L1 block was used." It matters whenever relevant L1 data, such as batch data, deposits, or other derivation inputs, exists between the two L1 heads.

Action-harness PoC file:

actions/harness/tests/l1_head_relevance.rs

Full action-harness PoC code:

Rust
//! Action test showing that the selected L1 head changes derivation visibility.
//!
//! The same sequencer-built L2 block is submitted as calldata in L1 block 1.
//! A verifier whose L1 view is capped at genesis cannot see that batch and
//! remains at L2 genesis. A verifier whose L1 view includes block 1 derives
//! the L2 block. This is the production derivation meaning of `l1_head`: it is
//! the tip of the L1 data view, not irrelevant metadata.

use base_action_harness::{
    ActionL2Source, ActionTestHarness, Batcher, BatcherConfig, L1MinerConfig, SharedL1Chain,
    TestRollupConfigBuilder,
};
use base_batcher_encoder::{DaType, EncoderConfig};

#[tokio::test]
async fn stale_l1_head_cannot_derive_batch_visible_at_later_l1_head() {
    let batcher_cfg = BatcherConfig {
        encoder: EncoderConfig { da_type: DaType::Calldata, ..EncoderConfig::default() },
        ..BatcherConfig::default()
    };
    let rollup_cfg = TestRollupConfigBuilder::base_mainnet(&batcher_cfg).build();
    let mut h = ActionTestHarness::new(L1MinerConfig::default(), rollup_cfg);

    // H_stale: a verifier/proof view capped at L1 genesis, before the batch is included.
    let stale_l1_view = SharedL1Chain::from_blocks(h.l1.chain().to_vec());
    assert_eq!(stale_l1_view.tip().expect("genesis exists").number(), 0);

    // Build the exact L2 block that will be submitted to L1.
    let sequencer_l1_view = SharedL1Chain::from_blocks(h.l1.chain().to_vec());
    let mut sequencer = h.create_l2_sequencer(sequencer_l1_view);
    let l2_block = sequencer.build_next_block_with_single_transaction().await;

    // Mine L1 block 1 containing the batch data for that L2 block.
    let mut source = ActionL2Source::new();
    source.push(l2_block);
    Batcher::new(source, &h.rollup_config, batcher_cfg.clone()).advance(&mut h.l1).await;

    // H_game: a later verifier/proof view that includes the batch-bearing L1 block.
    let game_l1_view = SharedL1Chain::from_blocks(h.l1.chain().to_vec());
    assert_eq!(game_l1_view.tip().expect("post-batch head exists").number(), 1);

    // With H_stale, the derivation pipeline cannot see L1 block 1, so it cannot
    // derive the L2 block whose batch was included there.
    let (mut stale_node, _) =
        h.create_test_rollup_node_from_sequencer(&mut sequencer, stale_l1_view);
    stale_node.initialize().await;
    let stale_derived = stale_node.run_until_idle().await;
    assert_eq!(stale_derived, 0, "stale L1 head cannot see the batch-bearing L1 block");
    assert_eq!(stale_node.l2_safe_number(), 0, "stale view remains at L2 genesis");

    // With H_game, the exact same batch is visible, so derivation advances to L2 block 1.
    let (mut game_node, _) = h.create_test_rollup_node_from_sequencer(&mut sequencer, game_l1_view);
    game_node.initialize().await;
    let game_derived = game_node.run_until_idle().await;
    assert_eq!(game_derived, 1, "later L1 head sees the batch and derives it");
    assert_eq!(game_node.l2_safe_number(), 1, "later L1 head reaches L2 block 1");

    let game_safe = game_node.safe_head_at_l1(1).await.expect("safe head recorded for L1 block 1");
    assert_eq!(game_safe.safe_head.number, 1, "L1 block 1 maps to derived L2 block 1");

    assert_ne!(
        stale_node.l2_safe().block_info.hash,
        game_node.l2_safe().block_info.hash,
        "different L1 data views produce different L2 safe heads"
    );
}

Run command:

Bash
cargo test -p base-action-harness --test l1_head_relevance -- --nocapture

Observed passing output:

running 1 test
test stale_l1_head_cannot_derive_batch_visible_at_later_l1_head ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.86s

This test is intentionally independent from the Solidity mock-verifier PoC below. The Solidity PoC proves that AggregateVerifier.initializeWithInitData() accepts a mismatched proof context. The Base action-harness PoC proves that the mismatched proof context is security-relevant because the selected l1_head changes the L1 data view and can change the derived L2 safe head.

Supplemental evidence: proof-client target binding in the ZK path

I added three focused local Rust tests to Base's proof-client code to check the follow-up claim that the L1 head is irrelevant "as long as proofs attest to the correct L2 block number and state root."

The relevant production code path is:

  1. WitnessExecutor::run() calls the Succinct advance_to_target() helper with Some(boot.claimed_l2_block_number).
  2. If the derivation data source is exhausted, advance_to_target() sets the requested target to the current safe-head number and then returns Ok((safe_head, output_root, intermediate_roots)).
  3. WitnessExecutor::run() then checks only output_root == boot.claimed_l2_output_root. It does not assert safe_head.block_info.number == boot.claimed_l2_block_number.
  4. BootInfoStruct::new() commits l2BlockNumber: boot_info.claimed_l2_block_number into the SP1 public values.

The tests prove those points directly:

  • base-proof-driver::core::tests::end_of_source_downgrades_requested_target_to_current_safe_head
    • requests target L2 block 1
    • simulates PipelineError::EndOfSource
    • observes successful return of safe head 0
  • base-proof-succinct-client-utils::client::tests::succinct_advance_to_target_accepts_end_of_source_before_requested_target
    • repeats the same behavior through the Succinct helper using Base mainnet rollup config
    • observes successful return of safe head 0 for requested target 1
  • base-proof-succinct-client-utils::boot::tests::boot_info_struct_commits_claimed_target_block_number
    • constructs SP1 public values with actual pre/safe-head number 0
    • confirms l2BlockNumber is still the requested claimed_l2_block_number 1

This is not presented as a separate impacted asset claim. It is supporting proof-pipeline evidence for the in-scope smart-contract bug: the L1 head is derivation context, and the proof pipeline relies on correct binding between the claimed L2 statement and the L1 data view.

Proof-client test locations:

crates/proof/driver/src/core.rs
crates/proof/succinct/utils/client/src/client.rs
crates/proof/succinct/utils/client/src/boot.rs

Run commands:

Bash
cargo test -p base-proof-driver end_of_source_downgrades_requested_target_to_current_safe_head -- --nocapture
cargo test -p base-proof-succinct-client-utils target -- --nocapture

Observed passing output:

running 1 test
test core::tests::end_of_source_downgrades_requested_target_to_current_safe_head ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

running 2 tests
test boot::tests::boot_info_struct_commits_claimed_target_block_number ... ok
test client::tests::succinct_advance_to_target_accepts_end_of_source_before_requested_target ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 16 filtered out

Full proof-client test patch:

Diff
diff --git a/crates/proof/driver/Cargo.toml b/crates/proof/driver/Cargo.toml
index 58219f5..1fcbbfb 100644
--- a/crates/proof/driver/Cargo.toml
+++ b/crates/proof/driver/Cargo.toml
@@ -48,3 +48,6 @@ std = [
 	"thiserror/std",
 	"tracing/std",
 ]
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt"] }
diff --git a/crates/proof/driver/src/core.rs b/crates/proof/driver/src/core.rs
index 2db6e88..e61e3fa 100644
--- a/crates/proof/driver/src/core.rs
+++ b/crates/proof/driver/src/core.rs
@@ -179,3 +179,172 @@ where
         }
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use alloc::{sync::Arc, vec::Vec};
+    use core::fmt;
+
+    use alloy_consensus::{Header, Sealable, Sealed};
+    use alloy_primitives::B256;
+    use async_trait::async_trait;
+    use base_common_genesis::{RollupConfig, SystemConfig};
+    use base_common_rpc_types_engine::BasePayloadAttributes;
+    use base_consensus_derive::{
+        Pipeline, PipelineError, PipelineErrorKind, PipelineResult, Signal, SignalReceiver,
+        StepResult,
+    };
+    use base_proof_executor::BlockBuildingOutcome;
+    use base_protocol::{AttributesWithParent, BlockInfo, L2BlockInfo};
+    use spin::RwLock;
+
+    use super::Driver;
+    use crate::{DriverPipeline, Executor, PipelineCursor, TipCursor};
+
+    #[derive(Debug)]
+    struct MockExecutorError;
+
+    impl fmt::Display for MockExecutorError {
+        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+            f.write_str("mock executor error")
+        }
+    }
+
+    impl core::error::Error for MockExecutorError {}
+
+    #[derive(Debug, Default)]
+    struct MockExecutor;
+
+    #[async_trait]
+    impl Executor for MockExecutor {
+        type Error = MockExecutorError;
+
+        async fn wait_until_ready(&mut self) {}
+
+        fn update_safe_head(&mut self, _header: Sealed<Header>) {}
+
+        async fn execute_payload(
+            &mut self,
+            _attributes: BasePayloadAttributes,
+        ) -> Result<BlockBuildingOutcome, Self::Error> {
+            unreachable!("the exhausted pipeline must not produce executable payloads")
+        }
+
+        fn compute_output_root(&mut self) -> Result<B256, Self::Error> {
+            unreachable!("the exhausted pipeline must not execute blocks")
+        }
+    }
+
+    #[derive(Debug)]
+    struct ExhaustedPipeline {
+        origin: BlockInfo,
+        rollup_config: RollupConfig,
+    }
+
+    impl ExhaustedPipeline {
+        fn new(origin: BlockInfo) -> Self {
+            Self { origin, rollup_config: RollupConfig::default() }
+        }
+    }
+
+    impl Iterator for ExhaustedPipeline {
+        type Item = AttributesWithParent;
+
+        fn next(&mut self) -> Option<Self::Item> {
+            None
+        }
+    }
+
+    #[async_trait]
+    impl Pipeline for ExhaustedPipeline {
+        fn peek(&self) -> Option<&AttributesWithParent> {
+            None
+        }
+
+        async fn step(&mut self, _cursor: L2BlockInfo) -> StepResult {
+            StepResult::StepFailed(PipelineError::EndOfSource.crit())
+        }
+
+        fn rollup_config(&self) -> &RollupConfig {
+            &self.rollup_config
+        }
+
+        async fn system_config_by_number(
+            &mut self,
+            _number: u64,
+        ) -> Result<SystemConfig, PipelineErrorKind> {
+            Ok(SystemConfig::default())
+        }
+    }
+
+    impl base_consensus_derive::OriginProvider for ExhaustedPipeline {
+        fn origin(&self) -> Option<BlockInfo> {
+            Some(self.origin)
+        }
+    }
+
+    #[async_trait]
+    impl SignalReceiver for ExhaustedPipeline {
+        async fn signal(&mut self, _signal: Signal) -> PipelineResult<()> {
+            Ok(())
+        }
+    }
+
+    #[async_trait]
+    impl DriverPipeline<ExhaustedPipeline> for ExhaustedPipeline {
+        fn flush(&mut self) {}
+
+        async fn produce_payload(
+            &mut self,
+            _l2_safe_head: L2BlockInfo,
+        ) -> Result<AttributesWithParent, PipelineErrorKind> {
+            Err(PipelineError::EndOfSource.crit())
+        }
+    }
+
+    fn block_info(byte: u8, number: u64) -> BlockInfo {
+        BlockInfo::new(B256::repeat_byte(byte), number, B256::repeat_byte(byte.wrapping_sub(1)), 0)
+    }
+
+    fn l2_info(number: u64, origin: BlockInfo) -> L2BlockInfo {
+        L2BlockInfo::new(block_info(0x20 + number as u8, number), origin.id(), 0)
+    }
+
+    #[tokio::test]
+    async fn end_of_source_downgrades_requested_target_to_current_safe_head() {
+        let origin = block_info(0x11, 10);
+        let safe_head = l2_info(0, origin);
+        let safe_head_output_root = B256::repeat_byte(0x33);
+        let safe_head_header = Header { number: 0, ..Default::default() }.seal_slow();
+
+        let mut pipeline_cursor = PipelineCursor::new(0, origin);
+        pipeline_cursor.advance(
+            origin,
+            TipCursor::new(safe_head, safe_head_header, safe_head_output_root),
+        );
+
+        let cursor = Arc::new(RwLock::new(pipeline_cursor));
+        let mut driver = Driver::<MockExecutor, ExhaustedPipeline, ExhaustedPipeline>::new(
+            cursor,
+            MockExecutor,
+            ExhaustedPipeline::new(origin),
+        );
+        let mut derived_blocks: Vec<(L2BlockInfo, B256)> = Vec::new();
+
+        let requested_target = 1;
+        let (returned_safe_head, returned_root) = driver
+            .advance_to_target(&RollupConfig::default(), Some(requested_target), |info, root| {
+                derived_blocks.push((info, root));
+            })
+            .await
+            .expect("EndOfSource is treated as successful derivation halt");
+
+        assert!(derived_blocks.is_empty(), "no block was derived before EndOfSource");
+        assert_eq!(returned_safe_head.block_info.number, 0);
+        assert_eq!(returned_root, safe_head_output_root);
+        assert!(
+            returned_safe_head.block_info.number < requested_target,
+            "driver returned an earlier safe head than the requested target"
+        );
+    }
+}
diff --git a/crates/proof/succinct/utils/client/Cargo.toml b/crates/proof/succinct/utils/client/Cargo.toml
index 89a3b06..80cd3cc 100644
--- a/crates/proof/succinct/utils/client/Cargo.toml
+++ b/crates/proof/succinct/utils/client/Cargo.toml
@@ -49,6 +49,8 @@ cfg-if.workspace = true
 
 [dev-dependencies]
 base-common-chains.workspace = true
+base-common-rpc-types-engine.workspace = true
+tokio = { workspace = true, features = ["macros", "rt"] }
 
 [lints]
 workspace = true
diff --git a/crates/proof/succinct/utils/client/src/boot.rs b/crates/proof/succinct/utils/client/src/boot.rs
index 190c67b..e885a88 100644
--- a/crates/proof/succinct/utils/client/src/boot.rs
+++ b/crates/proof/succinct/utils/client/src/boot.rs
@@ -59,8 +59,9 @@ impl BootInfoStruct {
 
 #[cfg(test)]
 mod tests {
-    use alloy_primitives::b256;
+    use alloy_primitives::{Address, B256, b256};
     use base_common_chains::Registry;
+    use base_proof::BootInfo;
 
     use super::*;
 
@@ -81,4 +82,34 @@ mod tests {
             assert_eq!(got, expected, "config hash mismatch for chain {chain_id}");
         }
     }
+
+    #[test]
+    fn boot_info_struct_commits_claimed_target_block_number() {
+        let actual_safe_head_number = 0;
+        let requested_target_block_number = 1;
+        let claimed_output_root = B256::repeat_byte(0x33);
+
+        let public_values = BootInfoStruct::new(
+            BootInfo {
+                l1_head: B256::repeat_byte(0x11),
+                agreed_l2_output_root: B256::repeat_byte(0x22),
+                claimed_l2_output_root: claimed_output_root,
+                claimed_l2_block_number: requested_target_block_number,
+                chain_id: 8453,
+                rollup_config: Registry::rollup_config(8453).expect("missing Base rollup").clone(),
+                l1_config: Default::default(),
+                proposer: Address::ZERO,
+                intermediate_block_interval: 10,
+                l1_head_number: 10,
+            },
+            actual_safe_head_number,
+            Vec::new(),
+        );
+
+        assert_eq!(public_values.l2PreBlockNumber, actual_safe_head_number);
+        assert_eq!(public_values.l2BlockNumber, requested_target_block_number);
+        assert_eq!(public_values.l2PostRoot, claimed_output_root);
+        assert_ne!(public_values.l2BlockNumber, public_values.l2PreBlockNumber);
+        assert!(public_values.intermediateRoots.is_empty());
+    }
 }
diff --git a/crates/proof/succinct/utils/client/src/client.rs b/crates/proof/succinct/utils/client/src/client.rs
index 8ac07f0..c5b112c 100644
--- a/crates/proof/succinct/utils/client/src/client.rs
+++ b/crates/proof/succinct/utils/client/src/client.rs
@@ -201,3 +201,173 @@ where
         std::mem::forget(block);
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use std::{fmt, sync::Arc};
+
+    use alloy_consensus::{Header, Sealable, Sealed};
+    use alloy_primitives::B256;
+    use async_trait::async_trait;
+    use base_common_chains::Registry;
+    use base_common_genesis::{RollupConfig, SystemConfig};
+    use base_common_rpc_types_engine::BasePayloadAttributes;
+    use base_consensus_derive::{
+        PipelineErrorKind, PipelineResult, Signal, StepResult,
+    };
+    use base_proof_driver::{Driver, DriverPipeline, Executor, PipelineCursor};
+    use base_proof_executor::BlockBuildingOutcome;
+    use base_protocol::{AttributesWithParent, BlockInfo, L2BlockInfo};
+    use spin::RwLock;
+
+    use super::*;
+
+    #[derive(Debug)]
+    struct MockExecutorError;
+
+    impl fmt::Display for MockExecutorError {
+        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+            f.write_str("mock executor error")
+        }
+    }
+
+    impl std::error::Error for MockExecutorError {}
+
+    #[derive(Debug, Default)]
+    struct MockExecutor;
+
+    #[async_trait]
+    impl Executor for MockExecutor {
+        type Error = MockExecutorError;
+
+        async fn wait_until_ready(&mut self) {}
+
+        fn update_safe_head(&mut self, _header: Sealed<Header>) {}
+
+        async fn execute_payload(
+            &mut self,
+            _attributes: BasePayloadAttributes,
+        ) -> Result<BlockBuildingOutcome, Self::Error> {
+            unreachable!("the exhausted pipeline must not produce executable payloads")
+        }
+
+        fn compute_output_root(&mut self) -> Result<B256, Self::Error> {
+            unreachable!("the exhausted pipeline must not execute blocks")
+        }
+    }
+
+    #[derive(Debug)]
+    struct ExhaustedPipeline {
+        origin: BlockInfo,
+        rollup_config: RollupConfig,
+    }
+
+    impl ExhaustedPipeline {
+        fn new(origin: BlockInfo, rollup_config: RollupConfig) -> Self {
+            Self { origin, rollup_config }
+        }
+    }
+
+    impl Iterator for ExhaustedPipeline {
+        type Item = AttributesWithParent;
+
+        fn next(&mut self) -> Option<Self::Item> {
+            None
+        }
+    }
+
+    #[async_trait]
+    impl Pipeline for ExhaustedPipeline {
+        fn peek(&self) -> Option<&AttributesWithParent> {
+            None
+        }
+
+        async fn step(&mut self, _cursor: L2BlockInfo) -> StepResult {
+            StepResult::StepFailed(PipelineError::EndOfSource.crit())
+        }
+
+        fn rollup_config(&self) -> &RollupConfig {
+            &self.rollup_config
+        }
+
+        async fn system_config_by_number(
+            &mut self,
+            _number: u64,
+        ) -> Result<SystemConfig, PipelineErrorKind> {
+            Ok(SystemConfig::default())
+        }
+    }
+
+    impl base_consensus_derive::OriginProvider for ExhaustedPipeline {
+        fn origin(&self) -> Option<BlockInfo> {
+            Some(self.origin)
+        }
+    }
+
+    #[async_trait]
+    impl SignalReceiver for ExhaustedPipeline {
+        async fn signal(&mut self, _signal: Signal) -> PipelineResult<()> {
+            Ok(())
+        }
+    }
+
+    #[async_trait]
+    impl DriverPipeline<ExhaustedPipeline> for ExhaustedPipeline {
+        fn flush(&mut self) {}
+
+        async fn produce_payload(
+            &mut self,
+            _l2_safe_head: L2BlockInfo,
+        ) -> Result<AttributesWithParent, PipelineErrorKind> {
+            Err(PipelineError::EndOfSource.crit())
+        }
+    }
+
+    fn block_info(byte: u8, number: u64) -> BlockInfo {
+        BlockInfo::new(B256::repeat_byte(byte), number, B256::repeat_byte(byte.wrapping_sub(1)), 0)
+    }
+
+    fn l2_info(number: u64, origin: BlockInfo) -> L2BlockInfo {
+        L2BlockInfo::new(block_info(0x20 + number as u8, number), origin.id(), 0)
+    }
+
+    #[tokio::test]
+    async fn succinct_advance_to_target_accepts_end_of_source_before_reque

The original report as published on Immunefi, by Singapore_Lion. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a public-input binding mismatch: initializeWithInitData verifies the initial proof against an L1 origin parsed from calldata instead of the game's stored immutable l1Head().

Impact

A game could be finalised with an invalid state root on L1 and the dispute mechanism could be bypassed, though the report demonstrates this with mock verifiers and harness tests rather than a live deployment.

What the attacker needed

Ability to create a dispute game; a valid proof for a different recent L1 head; proof threshold of one

The fix

The initial proof should be bound to the game's stored l1Head() rather than a calldata-supplied L1 origin, matching the later verifyProposalProof path.

How it was found

  1. Create a dispute game through the factory, which stores the parent block hash as the game's L1 head.
  2. Submit initial proof data whose embedded L1 origin is a different recent canonical L1 block.
  3. The contract checks only that the origin is a recent canonical block, not that it equals the stored L1 head.
  4. The proof is verified against the calldata-supplied origin and accepted as the game's initial proof.
  5. With a threshold of one, the game resolves and updates the AnchorStateRegistry.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A dispute game is an on-chain claim that a particular L2 state is correct, and it is checked against a specific snapshot of the L1 chain called the L1 head. This contract let the person submitting the first proof pick a different, older snapshot than the one the game was created with, and still accepted the proof. Because the older snapshot can hide data that changes the derived L2 state, the game could settle on a result that was never actually proven.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Base Azul

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.