Critical x402 SDK Flaw Allows Malicious APIs to Drain AI Agent Token Balances
The x402 SDK’s default client lacked spending limits, letting a malicious API drain an AI agent’s token balance. Organizations must enforce spend caps and map this control to AI‑governance objectives for audit readiness.
ADTP Breach Watch· October 23, 2026· The Hacker News
SeverityHigh
Type🤖 Advisory
ConfidenceHigh
ReportedOct 23, 2026
Technology & SaaSTechnology SaaS firms using AI agentsAPI providers integrating the x402 SDKThird-Party Dependency
Check if you use it. This incident came through a third party or the supply chain. If the product or supplier is in your estate or your vendors', start with the questions to ask below.
What happened
The x402 SDK’s default client did not enforce any spending limit, so a malicious API could request a payment that automatically signed off the full token balance of an AI agent. The SDK was patched on August 18 to add an optional limit, but older versions remain vulnerable.
Why it matters for trust and compliance
The incident underscores the need for continuous AI‑governance controls that enforce spend limits and provide auditable evidence of third‑party API validation.
Enforce spend‑limit controls and capture evidence for AI‑risk frameworks.
Map the SDK‑spend‑limit control to the VCF control objective for AI governance, supporting multiple compliance regimes.
Who is affected
Technology SaaS firms using AI agentsAPI providers integrating the x402 SDK
Recommended actions
Upgrade to the latest x402 SDK version that includes spending limits.
Configure explicit spend caps for all AI agents before deployment.
Implement runtime monitoring and alerts for abnormal token balance changes.
Document and map the spend‑limit control to your AI‑governance framework.
Regulations library
Every US state privacy law, on one map
24 states have a comprehensive privacy law in the library, alongside the EU, UK, US federal and global laws: 102 in all, each explained in plain words with its sources. Select a state to see what applies there.