AI Agent Uncovers 18.4 Trillion XRP Vulnerability in Ledger Code
An artificial intelligence security agent developed by Veria Labs discovered a critical flaw in the XRP Ledger (XRPL) that could have theoretically generated 18.4 trillion new XRP tokens through a single transaction, blockmedia.co.kr reported. The flaw remained undetected for 11 years within the core node program’s open-source code before researchers identified it in September 2024. Veria Labs stated that it received $250,000, which it claimed was the largest-ever bug bounty payout for a vulnerability independently discovered by an AI agent, from the XRPL bug bounty program.
Ripple Labs deployed an emergency patch within three days of notification and awarded Veria Labs a $250,000 bug bounty. The vulnerability highlights the growing capability of specialized AI security agents to uncover complex systemic risks in established blockchain networks.
How the AI Discovered the Integer Overflow Flaw
Veria Labs deployed its proprietary security AI agent, Veria AI, on the evening of September 21, 2024, to scan the core node program of the XRP Ledger known as “rippled.” Launched in 2012, XRPL has long operated external security audits and bug bounty programs, having paid out more than $1 million in bug rewards and undergone over 12 security audits and public vulnerability verification competitions since 2024. The AI agent identified two distinct defects written years apart that, when combined, bypassed the network’s asset creation safeguards.
The first defect originated in a 2015 payment engine code designed to handle decentralized exchange transactions. When processing multiple sell orders simultaneously, the system summed the amounts using a 64-bit integer. This created an integer overflow vulnerability where calculations exceeding the maximum value shrank abnormally.
The second defect involved the “XRPNotCreated” safety mechanism added in 2017 to prevent unauthorized token creation. The AI discovered that this guardrail also relied on vulnerable 64-bit integer arithmetic. Veria AI formulated a specific transaction structure across 256 accounts that tricked the payment engine into calculating a minute payment while distributing massive token amounts to sellers, all while the guardrail misidentified the asset increase as normal transaction fee burning.
The AI’s generated attack structure involved setting the XRP quantity requested by each order to 2 to the 56th power plus one drop, with a drop representing the minimum unit of XRP where 1 million drops equal 1 XRP. The sum of the 256 orders totaled 2 to the 64th power plus 256 drops, which the vulnerable payment engine miscalculated due to overflow as 256 drops while purchasers paid minimal amounts and each of the 256 seller accounts received massive XRP payouts. Attackers did not require validator permissions or special network access, needing only hundreds of accounts, orders, and a single payment transaction with initial reserve and fee costs amounting to only a few hundred XRP, and attackers could repeat the process to generate additional unauthorized XRP. Veria AI did not merely point out vulnerability possibilities but calculated an attack scenario combining the two defects and automatically produced proof-of-concept code working on a local XRPL network, a capability general-purpose coding AI agents failed to demonstrate when provided the same source code.
Human Researchers Verify the Code Through Overnight Testing
Cayden Liao, a researcher at Veria Labs, reviewed the AI’s generated concept proof code three times after receiving the alert at 11:00 p.m., stating, When the AI reported the possibility of unlimited XRP generation around 11 p.m. on Monday, I couldn’t believe it at first.
Finding no errors in the logic, Liao woke a company founding engineer at 4:00 a.m. to double-check the findings.
The research team concluded by Tuesday morning that the flaw was exploitable on the live mainnet. At the time of discovery, the total circulating supply of XRP stood at 100 billion tokens, meaning the exploit could have theoretically minted roughly 184 times the original supply against a market capitalization of $940 billion.
Ripple Deploys Emergency Patch and Issues Record Bounty
Veria Labs submitted the vulnerability and proof-of-concept code to the official XRPL bug bounty program on September 22, 2024. RippleX engineering teams replicated the bug on the same day and upgraded the risk rating from major to critical.
Ripple integrated a fix on September 23 and released an emergency updated version, xrpld 3.4.1, on September 25, bypassing the standard two-week validator voting process due to the severity of the threat. Following a two-week blackout period to prevent attackers from exploiting the details, XRPL published the vulnerability specifics on October 9. RippleX engineering head J. Ayo Akinyele acknowledged the critical nature of the flaw and noted that AI is fundamentally altering the speed at which vulnerabilities are identified. Veria Labs received the $250,000 top-tier bounty reward on October 8.