Jump to content
Onchain Report

Crypto news from every chain

XRP Ledger fixes bug that could mint spendable XRP

XRPL fixed a flaw that could have created spendable XRP by exploiting a payment counting error, threatening the ledger’s 100 billion token supply cap.

Onchain Report Newsroom#f6d92f3 min read

XRP Ledger fixes bug that could mint spendable XRP

The XRP Ledger fixed a payment-engine bug that could have let attackers create spendable XRP, putting the token’s fixed supply at risk. The ledger’s vulnerability report says the flaw was fixed in software released Sept. 25, and developers found no evidence it had been exploited on a public network.

The bug was reported through the XRPL Bug Bounty program on Sept. 22. The report names researcher Cayden Liao and Veria AI as the finders. RippleX engineers reproduced the attack on a test server and confirmed that the XRP created could be spent in another transaction.

How could the bug create new XRP?

An attacker could place hundreds of offers in the ledger’s built-in exchange, or order book: a list of token swap offers. Each would trade a tiny amount of another token for an unusually large amount of XRP. One carefully built payment could then consume all the offers.

The payment engine added up the XRP owed across those offers using a fixed-width number. When the total exceeded what that number could hold, an integer overflow—a calculation wrapping back to a small value—made the amount charged to the buyer far smaller than the XRP credited to sellers.

The ledger’s “no XRP created” safety check used similar arithmetic, so it also missed the gap. And because the attacker could spread the XRP across hundreds of accounts, no single account had to exceed the separate balance limit.

How much would an attack have cost?

The XRPL report says the attacker needed only a few hundred XRP to fund account and offer reserves, most of which could be recovered, plus transaction fees. The offers had to be deliberately crafted, and ordinary payments would not reach the overflow.

The flaw is believed to have been present since the payment engine was written in 2015. All 100 billion XRP were created when the ledger launched in 2012. The potential attack could have added spendable XRP beyond that supply.

What changed in the fix?

The fix shipped in xrpld 3.4.1 on Sept. 25. It makes the payment engine reject a sum that would overflow and widens the safety check’s counter so it cannot wrap around in the same way.

CoinDesk’s report on the disclosure said the patch went out before developers publicly described the flaw. XRPL’s report says more than 80% of default UNL validators—trusted nodes that help confirm the ledger—were running the fixed version on release day.

Sources