AI Agent Payment Flaw Let Rogue APIs Ask for an Entire Token Balance
AI agents that pay for API calls using the x402 SDKs could be tricked into signing a payment for their full balance of a supported token, security firm V12 said on October 22. The cause was the SDKs' default client, which set no spending limit until releases on August 18 added one. The risk applied only to agents that signed payments automatically and whose apps set no limits of their own. A hostile API could turn a routine data request into a demand for the wallet's whole balance, and an earlier small payment could reveal the wallet address so the server could check the balance first.
The missing limit is one of 25 flaws V12 found by reviewing the code and running local tests. Three were rated critical, and the x402 Foundation fixed all three in the August 18 releases. The other two let a facilitator accept a Solana transaction that moved no tokens as valid payment (only in the TypeScript SDK), and let a malicious server get an agent to sign a login message for a different website. Neither V12 nor the foundation has reported any attacks using the flaws.
The bigger concern may be visibility. The foundation has published no security advisory, and its changelogs do not call the fixes security fixes. As of October 23, npm audit and PyPI showed no warnings for the affected earlier versions, according to The Hacker News, so developers relying on those checks would not be told to upgrade.