A decade-old integer overflow in the XRP Ledger's payment engine could have let an attacker mint spendable XRP from nothing, per a report published Friday.
Key Facts
A researcher reported a payment-engine bug through the XRPL Bug Bounty program on Sept. 22 that could have let an attacker mint spendable XRP from nothing, according to a report posted on Xrpl.org.
The flaw, believed present in the code since the payment engine was written in 2015, let a single crafted payment pay offer owners in full while charging the buyer a wrapped-around, near-zero total; there is no evidence it was ever exploited on a public network.
The fix shipped in the xrpld 3.4.1 release on Sept. 25, bypassing the XRP Ledger's usual validator-vote process because of the bug's severity, and more than 80% of default UNL validators had upgraded by the end of that day.
How a 64-Bit Overflow Could Have Minted Free XRP
The bug lived in how the payment engine sums amounts owed when one payment consumes many order-book offers at once. XRP balances are stored as 64-bit integers with a fixed ceiling, and the engine's addition had no overflow check.
A payment routed through enough mispriced offers could push that sum past the ceiling and wrap it around to a tiny number, so the engine paid each offer owner in full while charging the buyer only that minimal total, creating XRP that should not have existed.
Two existing safeguards missed it, the report said. The ledger's own invariant check, meant to confirm no transaction creates XRP, summed balance changes with the same unchecked arithmetic and wrapped around identically, while a separate check on single-account balances didn't trigger because the minted XRP could be spread across hundreds of accounts.
The exploit needed no large starting capital, only a few hundred XRP in reserves, returned once the objects are removed, plus transaction fees.
Why XRPL Skipped Its Own Amendment Process
"We judged a short upgrade window with this limited risk to be far safer than weeks of a publicly known, open exploit," the report said, explaining the decision to ship the fix immediately rather than wait for a vote.
RippleX Engineering reproduced the exploit on a standalone server, confirmed the minted XRP was spendable, and raised the finding's severity from major to critical. More than 80% of default UNL validators had upgraded to xrpld 3.4.1 by Sept. 25, the day it was released.
The report credited the find to Cayden Liao and Veria AI, and said the flaw likely went unnoticed for about a decade because no ordinary payment comes near triggering a 64-bit overflow.
