On 10 November Scroll registered a new bundle proof verifier on mainnet after a bug bounty report, and posted a report the next day (Scroll Mainnet Emergency Upgrade on 2026-11-10). Nothing was wrong with the proof system. The bug was in how one contract called another, and I’ve been grepping for the same shape since I read it.
What the old code did
ZkEvmVerifierPostFeynman built the verifier input by hand in assembly. It copied the first 0x180 bytes of the caller’s bundleProof to the start of a memory buffer, wrote the two verifier digests and the public input hash after them, appended the rest of the proof, and sent the buffer to the Halo2 verifier with a raw staticcall. It then checked only success, which tells you something didn’t revert, not which function ran.
So bytes 0 to 3 of that call were bytes 0 to 3 of a proof the caller chose.
With the earlier verifiers that didn’t matter. A Halo2 verifier from snark-verifier has no dispatcher, every call lands in the same code. The OpenVM 2.0 verifier is a Solidity wrapper around that code. It adds a typed verify(bytes,bytes,bytes32,bytes32), selector 0x24270d54, and keeps the Halo2 code as the fallback. A “proof” that starts with 0x24270d54 runs the wrapper’s verify instead, and that function reads the public values from ABI offsets in the rest of the bytes, which the caller also wrote. Scroll’s report says an old valid proof could then pass for a new public input. Using it needed the prover role or enforced batch mode (which opens after 7 days without finalization). They checked all 748 finalizations made while it was live, and none had the prefix.
The guard existed, on the other path
The wrapper’s authors had seen this coming. Its verify asserts bytes4(proofData[0:4]) == bytes4(0x00000000) before it self-calls into the fallback, with a comment explaining that a proof starting with 0x24270d54 would dispatch back into verify. A valid snark-verifier proof can’t start that way, because the first word is an accumulator limb of 88 bits, so its first four bytes are always zero.
That assert only runs inside verify. Scroll’s contract called the fallback directly, so for its calls nothing checked the first four bytes.
The fix
The fix (scroll-contracts#181, merge commit 8264260) calls the wrapper through its typed interface inside try/catch. The compiler writes the selector, the contract supplies the digests and the public input hash, and the payload that reaches the Halo2 fallback is byte for byte the same as before (they fuzzed old against new over 10,000 inputs). The proof also has to be exactly 1,760 bytes now. The old path accepted extra bytes at the end.
Grepping for it
In code it’s usually an assembly block that does calldatacopy(p, someBytes.offset, ...) and then staticcall(gas(), target, p, ...), or the Solidity version, target.staticcall(abi.encodePacked(userBytes, ...)). Adapters in front of zk verifiers are the obvious place. Anything that forwards caller bytes to a contract it believes has only a fallback has the same exposure.
A caller like this can be fine for years and become exploitable the day the callee changes. Scroll registers a verifier per batch version in MultipleVersionRollupVerifier, so a new version is a new address and a registry entry, and review attention goes to the new verifier. Listing the new callee’s selectors from its runtime code (cast selectors shows 0x24270d54 on the deployed wrapper) and checking them against the layout each caller sends is a small step.
For anyone writing an ERC with a pluggable verifier or adapter interface, I’d put one line in Security Considerations: callers pass the statement as typed arguments, and a verifier that also has a fallback gets called through one entry point only.
When a contract you call gets a new version or a new address, what in your process sends someone back to re-read the callers, and not only the new contract?