Critical x402 SDK vulnerability could let malicious APIs drain AI Agent token balances
Critical x402 SDK Flaw Could Let Malicious APIs Drain AI Agents’ Token Balances
Security firm V12 found 25 vulnerabilities in the x402 SDK that AI Agents use to pay for API calls, 3 of which were rated critical. The first is that the default client sets no spending cap before the fix, so a malicious API can make an automatically signing Agent sign away the entire balance of tokens it holds; the second is that the TypeScript version of the Solana facilitator treats a token approval that does not transfer tokens as a valid payment, which V12 calls a complete payment bypass; the third is that the automatic client does not verify the website before signing a SIWx login message, so a malicious server can use this to log in to other websites with the Agent's wallet. The three vulnerabilities were fixed in the version released on August 18; the new version caps each payment at 1 US dollar by default and only allows USD stablecoins recognized by the SDK. x402 was created by Coinbase and is now maintained by the x402 Foundation under the Linux Foundation.
Teams using x402 to give Agents automatic payments can use this to check upgrades and spending limits; npm audit alone will not deliver upgrade reminders.