A decade-old integer overflow in the XRP Ledger's payment engine could have let attackers mint 18.45 trillion spendable XRP in one transaction, threatening the network's fixed 100 billion supply and $94 billion market value. Veria Labs' AI found the flaw. RippleX patched it quietly in days with no evidence of exploitation. The narrow escape exposes persistent risks in core financial code.
The XRP Ledger almost lost its defining promise. All 100 billion tokens created at launch in 2012. No more ever issued. That fixed supply underpins trust from banks to payment firms. Yet for roughly 11 years a single line of unchecked arithmetic in the payment engine threatened to shatter it.
An Integer Overflow That Broke the Rules
Researchers at Veria Labs spotted the flaw. An AI-driven security agent flagged it. On Sept. 22 they reported the issue through the XRPL bug bounty program. Three days later developers shipped xrpld 3.4.1. The fix went live quietly. No public details at first. No amendment vote. Validators upgraded fast. Over 80% ran the patched version the same day, according to the XRPL Foundation vulnerability disclosure report.
But the real story sits in the code. When one payment consumed many offers from the ledger’s built-in decentralized exchange the engine summed the XRP owed using 64-bit signed integers. No overflow guard. Push the total past 2^63-1 and it wrapped around to a negative number or near zero. Sellers received full payment. The buyer paid almost nothing. The difference? New XRP that never existed before. And the network’s own check for “no XRP created” used the same flawed math. It missed the creation entirely.
Spread the minted tokens across hundreds of accounts. No single balance limit triggered. One transaction. Spendable counterfeit XRP. Veria Labs calculated a single exploit could generate roughly 18.45 trillion tokens. More than 184 times the entire supply. At recent prices that exposure approached $94 billion in market value. “This puts the full $94B at risk, more than 60 times the largest crypto hack on record,” Cayden Liao of Veria Labs told reporters.
The bug dated to the current payment engine introduced around 2015. A supply-protection invariant added in 2017 inherited the same weakness. Audits and bounty programs missed it. Normal transaction volume never approached the dangerous thresholds. So the flaw sat quiet.
RippleX engineers reproduced the attack on a standalone server. They confirmed the newly created XRP could be spent in a follow-up transaction. Severity jumped from major to critical. “An attacker could have created spendable XRP far beyond the total supply in a single validated transaction,” the official report states. Yet after thorough checks CoinDesk reported RippleX found no evidence of exploitation on any public network.
The attack setup required preparation. An adversary opened several hundred accounts. Each placed an offer selling a tiny amount of some issued token for an enormous quantity of XRP. A single payment from a buyer account then swept through every offer. The math broke. Funds flowed the wrong way. Most of the setup cost, a few hundred XRP in reserves plus fees, could be recovered later. Cheap enough to attempt. Devastating if successful.
Institutions building on XRPL care deeply about that 100 billion cap. Evernorth, Ripple Prime, Meritz and others rely on the scarcity. A sudden flood of new tokens would undermine prices, confidence and every contract tied to the ledger. Liquidity in XRP remains modest. Daily trading volume often sits well below $1 billion. Dumping trillions would collapse the market long before profits could be taken. The true damage would have been to the network’s foundational guarantee.
This incident marks the latest in a string of inflation bugs across crypto. Similar flaws hit Zcash in June and the Liquid Network last month. Each case highlights how even battle-tested code can hide dangerous edge cases in arithmetic or state handling. But the XRPL response stands out. Developers bypassed the usual amendment process. They coordinated directly with the XRPL Foundation and validators. The patch applied immediately on upgrade. Source code for the fix stayed private initially to avoid handing attackers a ready-made exploit. That decision drew notice. Vadari, a Ripple executive, later posted on X that AI tools change the game. “Things have changed with AI. You can’t just sneak in a critical bug patch in a regular public release process, because you’re going to get caught and reverse engineered right away.”
The AI That Found What Humans Missed
Veria Labs built the agent that succeeded where years of human review did not. The firm earned the maximum $250,000 bounty. Liao described the discovery as a chained vulnerability. One overflow in payment aggregation. Another in the invariant check. Together they defeated every safeguard. The report credits the AI with both finding the bugs and constructing a working proof of concept. That speed from report to patch, just three days, reflects heightened urgency in an era when code can be analyzed automatically at scale.
XRPL operators now run updated software. The fix adds explicit overflow checks during summation. Sums that exceed limits now fail cleanly with standard errors such as path-dry or partial payment. No new tokens created. The Batch transaction wrapper vulnerability fixed in the same release required an amendment, fixBatchV1_2, which activated on mainnet Oct. 9. Both issues are closed.
Still, questions linger. How many other dormant flaws hide in complex financial ledgers? XRPL processes payments, decentralized exchange trades and token issuance with high throughput and low fees. Its consensus mechanism avoids proof-of-work energy costs. Those design choices attracted real-world adoption. Yet they also concentrate risk in the core engine that moves value. The community dodged catastrophe this time. No funds lost. No supply inflated. Confidence held.
But the narrow escape serves as reminder. Fixed supplies only matter if the software enforces them without exception. Math errors don’t negotiate. And in a world where AI scans code faster than humans, the window between discovery and disclosure shrinks. Projects that treat every integer operation as potentially catastrophic will fare better. The rest risk sudden, silent breaks in the rules everyone assumed were ironclad.
Recent coverage from CryptoSlate underscores how close the network came. The flaw survived audits. It survived prior bounties. Only the combination of specialized AI scrutiny and rapid coordinated response prevented disaster. For an asset increasingly tied to institutional rails that outcome matters. The ledger survived. Its reputation for reliability took a quiet hit. And developers everywhere now have fresh reason to audit their own arithmetic with extreme care.