The XRP Ledger blockchain support fund reported that a vulnerability in the XRP Ledger payment core went unnoticed for almost 11 years and theoretically allowed the issuance of new XRP beyond the established limit of 100 billion tokens.
The issue was discovered by blockchain researcher Cayden Liao and security specialists at Veria AI. According to developers, the bug had been present in the code since 2015 and was related to an overflow when processing large batch trades on the built-in decentralized exchange of XRP Ledger.
How the Bug Could Lead to Extra XRP Being Issued
The vulnerability occurred in situations where a single transaction closed several hundred sell orders at once. The system calculated how much XRP needed to be debited from the buyer. If the final amount became too large and exceeded the allowable maximum, the calculation effectively rolled over to a small value.
As a result, sellers received the full amount specified in the orders, while only this greatly reduced value plus a fee was debited from the buyer. The difference between the actual value of the trades and the debited funds appeared on the network as new XRP, even though such tokens should not have existed.
What Would Be Required for an Attack
To exploit the bug, an attacker would need to create several hundred accounts, place a sell order for a small amount of some token for a very large amount in XRP on each account, and then buy all these orders in a single transaction.
The cost of such an operation was estimated at just a few hundred “drops” — the smallest units of XRP — as well as standard fees and reserves for creating accounts and orders. When objects are deleted, these reserves are returned. XRP obtained in this way could be transferred, exchanged, or sent to exchanges like regular coins.
The Vulnerability Was Closed
XRP Ledger developers stated that they have fixed the issue. The RippleX team also reported that they found no signs of this vulnerability being exploited on any public network.
A similar incident with comparable consequences was previously discovered in the private cryptocurrency blockchain Zcash: several months ago, a bug was found there that allowed the creation of unlimited fake ZEC inside the pool. This vulnerability had existed since May 2022.
