Home › Intelligence › Brief
BREACH BRIEF🟠 High Advisory

Critical x402 SDK Flaw Allows Malicious APIs to Drain AI Agents’ Token Balances

The x402 SDK’s default client allowed a malicious API to request and automatically sign a payment for an agent’s entire token balance. The issue, disclosed on 22 Oct 2026, affects AI agents that rely on the SDK and underscores the need for spending‑limit controls in AI‑agent supply chains.

LiveThreat™ Intelligence · 📅 November 18, 2026· 📰 thehackernews.com
🟠
Severity
High
AD
Type
Advisory
🎯
Confidence
High
🏢
Affected
3 sector(s)
✅
Actions
2 recommended
📰
Source
thehackernews.com

Critical x402 SDK Flaw Allows Malicious APIs to Drain AI Agents’ Token Balances

What Happened — The open‑source x402 SDK, widely used by AI agents to pay for external API calls with cryptocurrency tokens, contained a design flaw that let a malicious API request the full token balance of an agent and have the payment automatically signed. Security firm V12 disclosed the issue on 22 October 2026.

The root cause was the SDK’s default client implementation, which, until a 18 August 2026 release, did not enforce any spending limit. When an AI agent invoked an external API, the SDK would construct a payment transaction and sign it on the agent’s behalf. Because the client assumed unlimited spending, a crafted request could specify the agent’s entire token balance as the payment amount. The SDK would then sign and broadcast the transaction without prompting the operator or checking a quota.

The vulnerability is exploitable only by APIs that the agent trusts enough to invoke automatically – a common pattern for agents that delegate data‑rich calls (e.g., language model extensions, image generation services). In practice, any AI workload that runs unattended and relies on the default client can be drained of its token holdings in a single request.

V12’s analysis shows that the flaw is limited to agents that (a) use the default client, (b) have automatic payment signing enabled, and (c) have not applied the August 18 SDK update. Versions released before the patch remain vulnerable, and any downstream libraries that embed the old client inherit the same risk.

The vendor responded on 23 October with a security advisory and a patched SDK version (v2.4.1) that introduces a configurable spending‑limit parameter and disables automatic signing unless explicitly authorized. The advisory also recommends revoking any tokens that were used with pre‑patch SDKs, as they may have been exposed to unauthorized transfers.

Industry analysts note that the issue highlights a broader AI‑agent supply‑chain risk: SDKs that handle financial transactions must enforce least‑privilege defaults and provide transparent audit trails. Without such safeguards, the economic impact of a single malicious API call can be severe, especially for enterprises that allocate large token balances to high‑throughput AI workloads.

Why It Matters for Trust & Control Assurance — The flaw tests the control objective of secure configuration and usage limits for third‑party components, a single control that maps to many framework requirements (e.g., NIST CSF “Protect” safeguards, ISO 27001 asset management, and AI‑specific governance standards).

Who Is Affected — Companies building or operating AI agents that rely on the x402 SDK, including generative‑AI platforms, fintech AI services, and enterprise automation tools.

Recommended Actions

  • Upgrade all x402 SDK instances to version 2.4.1 or later.
  • Audit token usage logs for any unexpected full‑balance transfers since August 2026.
  • Enforce explicit spending caps in SDK configuration and disable automatic signing where possible.
  • Integrate SDK version checks into CI/CD pipelines to prevent regression to vulnerable releases.
  • Document the SDK’s security controls in your AI‑governance framework and map them to the relevant control objectives for audit readiness.

Source: The Hacker News – Critical x402 SDK Flaw Could Let Malicious APIs Drain AI Agents’ Token Balances

Technical Notes —

  • Attack vector: Malicious API request crafted to specify the full token balance as the payment amount.
  • Vulnerability type: Improper default configuration leading to unrestricted financial transactions (privilege‑escalation‑like behavior).
  • Affected component: x402 SDK default client (pre‑v2.4.1).
  • Mitigation: SDK update adds configurable max_spend parameter and requires explicit consent for each payment.
  • Indicators of compromise: Unusual large‑value token transfers from AI‑agent wallets, especially from addresses that have not interacted with the target API before.
📰 Original Source
https://thehackernews.com/2026/10/critical-x402-sdk-flaw-could-let.html ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Trust Operations

Misconfigurations are control gaps in disguise.

Verisq AI Trust Operations turns findings like this into mapped controls with continuous evidence, keeping your audit readiness current instead of point-in-time.

Map your controls with Verisq AI Trust Operations →