GHSA-FCMM-54JP-7VF6

The Even Number DoS: Cooking a Blockchain with Bad Math

Alon Barad
Alon Barad
Software Engineer

Jan 4, 2026·7 min read·2 visits

Executive Summary (TL;DR)

A math function in Frontier's Ethereum layer is secretly 20x slower for even numbers than odd ones, but the gas fee was the same. Attackers could spam cheap transactions using even numbers to trigger this slow path, causing a Denial of Service and potentially halting the blockchain.

CVE-2023-28431 is a critical Denial of Service vulnerability in Frontier, an Ethereum compatibility layer for Substrate. The issue stems from a gross miscalculation in transaction costs for a cryptographic precompile. A specific mathematical operation, modular exponentiation, is dramatically slower when using even numbers as a modulus due to an underlying library's implementation. Frontier failed to charge extra for this slow path, allowing an attacker to submit cheap transactions that consume massive amounts of computational power, effectively grinding the entire network to a halt for pennies on the dollar.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.25%
Top 100% most exploited

Affected Systems

Frontier (Ethereum compatibility layer for Substrate)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Frontier
paritytech
All versions before the inclusion of commit 5af12e94d7dfc8a0208a290643a800f55de7b219Not specified, but patched in commit 5af12e94d7dfc8a0208a290643a800f55de7b219
AttributeDetail
CWE IDCWE-682: Incorrect Calculation
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
CVSS v3.1 Score7.5 (High)
EPSS Score0.25% (0.00249)
ImpactDenial of Service
Exploit StatusProof-of-Concept
CWE-682
Incorrect Calculation

The software performs a calculation that results in an incorrect value. In this case, the gas cost calculation did not accurately reflect the computational resources required for modular exponentiation operations with even moduli, creating an economic imbalance that leads to a Denial of Service condition.

Vulnerability Timeline

Fix is committed to the Frontier repository.
2023-03-15
CVE-2023-28431 is officially published by NVD.
2023-03-22
GitHub Security Advisory GHSA-fcmm-54jp-7vf6 is published.
2023-03-22