V12 Details Three Critical x402 SDK Flaws; Fixes Shipped in August

· Original article ↗

Summary

V12 reported three critical x402 SDK flaws that could enable full-balance token payments, free resource access through a Solana facilitator, or relayed wallet sign-ins. Fixes shipped Aug. 18; no attacks have been publicly reported.

Key points

  • V12 said code review and local tests found 25 flaws, including three rated critical; the x402 Foundation fixed all three in releases on August 18.
  • Before the spending-limit fix, an automatically signing client without app-set limits could accept a malicious API's payment request for a wallet's full balance of a supported token, V12 said.
  • The TypeScript Solana facilitator could treat a token approval as a transfer. V12's test showed it accepting the approval as payment, but did not send a live transaction.
  • The SIWx clients did not verify that the website in a login message matched the site that sent the payment-required response, potentially allowing a relayed signature to log in to another site.
  • The August releases added default spending controls, including a $1 per-payment cap and limits to recognized stablecoins; apps can disable these controls.
  • The article says no attacks using the flaws have been publicly reported. As of October 23, the project had no security advisory, and package audit checks showed no advisories for the last pre-fix releases.

Article Details

Vulnerability Types
  • Missing spending limit in the default client could allow an automatically signed payment for a wallet's full balance.
  • Solana facilitator failed to validate the token instruction type, accepting an approval as a transfer.
  • SIWx clients did not verify that the website named in a login message matched the site that sent the payment response.
Severity
Critical
Affected Versions
  • @x402/svm 2.0.0–2.22.0
Exploitation Status
not_reported
Exploit Availability
unknown
Patch Status
available
Workarounds
  • Register a payment policy that rejects options above a set amount; older clients support registerPolicy in TypeScript and Go and register_policy in Python, which includes a max_amount policy.
  • Before signing an SIWx login message, verify that it identifies the site contacted.
  • Set budgets for each payment and in total, and limit the tokens, networks, and recipients that can be paid.

MITRE ATT&CK

Products