Bor Security Bug Fix Review (v2.10.3)

Hello Everyone,

Below is the complete review post for Bor v2.10.3 which is now public.

It fixes two denial-of-service issues in Bor’s parallel block execution (BlockSTM V2), both reported through our bug bounty program on Immunefi, together with a set of hardening fixes found internally.

As usual for sensitive fixes, v2.10.3 was first distributed as a private build (v2.10.3-beta-priv on Amoy from 5 Oct 2026, v2.10.3-priv on mainnet from 8 Oct 2026) to validators and major infrastructure providers. Once most of the network had upgraded, the code was published as the stable v2.10.3 release. Neither issue was exploited on mainnet or Amoy as far as we know.

Affected versions: Bor v2.10.1 and v2.10.2, where BlockSTM V2 is enabled by default.
Fixed in: Bor v2.10.3 (also v2.10.3-priv / v2.10.3-beta-priv).


Background: how Bor imports a block

When importing a block, Bor runs the serial processor and the parallel processor (BlockSTM V2) at the same time and uses whichever finishes first. Both must produce the same result. The parallel processor runs transactions speculatively, so some of its work is thrown away when it turns out a transaction read stale data. Both issues below are cases where that speculative or redundant work was much more expensive than the gas the transactions paid for, and the node had to wait for it before finishing the import.

Unbounded shared keccak256 cache (Medium)

The parallel processor and the execution prefetcher share a per-block cache of keccak256 results, so the same input isn’t hashed twice. That cache had no size limit, and entries written during speculative execution were neither reverted nor bounded.

A sender could craft a small set of ordinary transactions where the canonical (serial) execution is cheap, but the speculative parallel execution fills the cache with hundreds of MiB of unique entries before it’s cancelled. In testing, a block using about 9.3M gas (around 20% of the block gas target) made the importing node allocate about 690 MiB and take over one second to import on a 4-core configuration. That’s longer than the mainnet block time, and repeated blocks would make affected nodes fall behind and could exhaust memory on nodes with little headroom.

The fix: the shared keccak256 and ecrecover caches are now size-capped. Past the cap, new results simply aren’t cached and are recomputed when needed. This is memoization only, so execution results don’t change.

Impact if unfixed: cheap, repeatable memory and CPU pressure on importing nodes, leading to block lag. Not consensus-affecting.

Repeated code hashing in parallel execution (Medium)

In the parallel processor, reading the code hash of an account whose code was created or changed earlier in the same transaction recomputed the keccak256 of the full contract code every time, instead of reusing the result. The EVM charges a small flat cost for this operation because clients are expected to have the hash cached.

A single valid transaction could repeat this read many times on a maximum-size contract. Serial execution handles that transaction in tens of milliseconds, but the parallel processor took around 11 seconds. Because cancellation only takes effect between transactions, the import waited for it to finish.

The fix: the parallel state now memoizes the code hash per transaction and address, and drops the cached entry when the code changes or the change is reverted. Execution results are unchanged.

Impact if unfixed: one transaction per block could delay block import by several seconds on every node with BlockSTM V2 enabled, a liveness risk. Not consensus-affecting.

Other hardening in v2.10.3

These were found internally while preparing the release:

  • Transaction filter and SetCode authorizations. The txpool’s address filter ([txpool] filtered-addresses) only checked the transaction sender. It now also rejects SetCode (EIP-7702) transactions carrying an authorization signed by a filtered address, so a filtered account can’t get code attached through another sender’s transaction.

  • RPC execution pool bound. Inside a JSON-RPC batch, an item that gave up its execution slot (for example while waiting for a receipt in eth_sendRawTransactionSync) could let the rest of the batch run outside the pool’s concurrency limit. Each batch item now waits for a slot. The configured ep-requesttimeout is also applied now, where before it was ignored.

  • Parallel execution correctness. Balance reads across a self-destruct boundary in the same block now resolve the same way as serial execution (bor#2403). Before, such blocks fell back to serial import.

  • Stranded pending transactions. Pending transactions stuck behind a head that stays below the base fee are evicted after [txpool] strandedlifetime (default 3h), so they no longer pile up in the pool.

The full list is in the release notes.

Announcement post here

v2.10.3 isn’t a hardfork. Nodes can be upgraded one at a time, in any order. Before restarting, check [heimdall] timeout in your config.toml: it’s now applied (default 30s), and older sample configs set it to 5s. Details are in the release notes.

Regards,
Polygon Labs

Useful review, and the explanation of why speculative work can cost far more than the gas paid is clear. The note to check the [heimdall] timeout before restarting is easy to miss: older sample configs set it to 5s and it is now applied, so operators who copied an old config.toml could see unexpected timeouts after upgrading. A one-line example of the old and new value in the upgrade steps would save support questions.