# Besu accepts code delegations with y_parity having value 2 or 3, leading to chain split

Besu accepted EIP-7702 code delegations with y_parity 2 or 3, which geth rejects, causing a chain split between clients.

- Payout: Contest reward
- Severity: medium
- Program: Ethereum Pectra Besu
- Credited: zigtur
- Disclosed: 2025-07-21
- Write-up quality: 7/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_ethereum_pectra_besu.pdf#3.1.1
- Library page: https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_besu%3A3.1.1
- Tags: domain:web3 impact:dos impact:integrity kind:contest platform:cantina sev:medium tech:evm technique:chained technique:source-review vuln:misconfiguration vuln:signature-replay

**Target:** Ethereum execution client (EIP-7702 code delegation validation)
**Root cause:** CodeDelegation.authorizer() only bounds recId to [0,3] instead of [0,1], and processCodeDelegation never re-validates y_parity, so signatures with v=2/3 are accepted and an authorizer is recovered.
**Steps:**
1. Start kurtosis localnet with one besu and one geth node, Pectra at epoch 1
2. Build a SetCodeTx with SetCodeAuthorization{ChainID, Address:0x...1234, Nonce:0, V:2, R:2, S:0x504F...97F4}
3. Sign and send the tx via geth RPC `client.SendTransaction`
4. Monitor both nodes' latest block hashes with web3.py script
5. Observe block hash mismatch at block 49: besu accepts delegation (recId=2), geth rejects
**How found:** Code review of CodeDelegationSignature/CodeDelegation against EIP-7702 spec and comparison with go-ethereum's ValidateSignatureValues, which enforces v==0||v==1; confirmed divergence empirically on a mixed-client localnet.
**Exploitation:** Submit a type-4 SetCodeTx whose auth-list entry has V=2; Besu processes the delegation and sets code for the recovered authorizer while geth discards the tx, producing divergent blocks and a chain fork.
**Insight:** When auditing consensus-critical client code, diff validation predicates against the reference client (geth) line by line; permissive bounds checks on signature v/recId are a classic source of chain-split divergence.
