Attacker can send malicious EIP-7702 transactions that cause rounds to time out and halt the chain
The mempool and block validator check the chain_id and SYSTEM_SENDER_ETH_ADDRESS of EIP-7702 authorizations in opposite orders, so a transaction with an invalid chain_id and the system sender as authority is accepted by the mempool but rejected during block validation. An attacker could repeatedly submit such transactions to block leaders, causing timeouts and halting the chain.
TheSchnilch Follow with 0xAsen and oct0pwn
Originally disclosed on Code4rena
Submitted by TheSchnilch, also found by 0xAsen and oct0pwn
bft/monad-eth-txpool/src/pool/transaction.rs#L112-L125bft/monad-eth-block-validator/src/lib.rs#L467-L475
The root cause is that during transaction validation in the mempool, the chain_id of an authorization is checked before verifying whether the authority is the SYSTEM_SENDER_ETH_ADDRESS (see first GitHub link). If the chain_id is incorrect, the transaction itself is still considered valid, but the authorization is not.
During block validation, however, the checks are performed in the opposite order: the SYSTEM_SENDER_ETH_ADDRESS check is done first, followed by the chain_id check (see second GitHub link). If the SYSTEM_SENDER_ETH_ADDRESS check fails, the whole transaction and therefore the block is invalid.
The problem arises when someone sends a transaction with the authority set to SYSTEM_SENDER_ETH_ADDRESS but with an invalid chain_id. In this case:
- Mempool validation: The transaction is accepted, because the
chain_idcheck fails first, so theSYSTEM_SENDER_ETH_ADDRESScheck is never performed. - Block validation: The transaction causes an error, because the
SYSTEM_SENDER_ETH_ADDRESScheck runs first, and the block is therefore deemed invalid and not voted on: see here. This means the block is never added to the block tree and therefore cannot be coherent. Becausetry_votewould only be called intry_add_and_commit_blocktree, it will never vote on the block, and a timeout will occur.
If an attacker sends such a transaction to many nodes, each node may include it in a block, causing repeated timeouts. Because the leader schedule is known, the attacker could also always send their transactions to the next leaders. This means he does not have to send the transaction to all nodes. This process can be repeated indefinitely, effectively halting the chain because no blocks are successfully executed. Since the transaction is never executed, the attacker can resubmit it endlessly at no cost.
Recommended mitigation steps
The SYSTEM_SENDER_ETH_ADDRESS check should also be performed first during transaction validation in the mempool. This way, invalid transactions would be rejected early and never included in a block, allowing the chain to continue operating normally.
View detailed Proof of Concept
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
The mempool validates the authorization chain_id before checking whether the authority is the system sender, while block validation performs the system sender check first, so a transaction can be accepted into the mempool but rejected during block validation.
Impact
An attacker could cause repeated timeouts and effectively halt the chain, and since the transaction is never executed they can resubmit it endlessly at no cost.
What the attacker needed
Ability to submit transactions to nodes; knowledge of the leader schedule (optional)
The fix
The SYSTEM_SENDER_ETH_ADDRESS check should be performed first during mempool transaction validation so invalid transactions are rejected early.
How it was found
- Create an EIP-7702 transaction whose authorization authority is the system sender address and whose chain_id is invalid.
- Send the transaction to nodes; the mempool accepts it because the chain_id check fails first.
- A leader includes the transaction in a block, but block validation rejects it because the system sender check runs first.
- The block is not voted on, causing a timeout.
- Repeat the process, optionally targeting the next leaders using the known leader schedule.
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 blockchain node has two stages: a mempool that holds pending transactions and a block validator that checks blocks before voting. Here the two stages check the same fields in a different order, so a transaction can pass the first check but fail the second. If enough of these transactions reach block producers, blocks keep failing and the chain stops making progress.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.