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

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
@x402/axiosTypeScript code that calls createSIWxPayload directly must now pass the URL of the 402 response, after any redirects. The @x402/fetch and @x402/axios wrappers pass it on their own.@x402/coreUpgrading to the latest releases also brings later fixes, including one for a separate payment bypass in @x402/core 2.27.0 in September. As of October 23, the latest versions are 2.28.0 for @x402/core, @x402/svm,@x402/extensions2.27.0 in September. As of October 23, the latest versions are 2.28.0 for @x402/core, @x402/svm, @x402/extensions, @x402/fetch and @x402/axios, v2.28.0 for the Go module and 2.25.0 for the Python package.@x402/fetchTypeScript code that calls createSIWxPayload directly must now pass the URL of the 402 response, after any redirects. The @x402/fetch and @x402/axios wrappers pass it on their own.@x402/svmEvery published @x402/svm release from 2.0.0 to 2.22.0 lacks the check, and every release from 2.23.0 on has it, The Hacker News found by searching the published packages.Sign-In-With-X (SIWx)x402 also has a sign-in extension called Sign-In-With-X (SIWx). It lets an agent log in by signing a short message with its wallet, for example to prove an earlier payment instead of paying again. On Ethereum, thex402AI agents paying for API calls with the x402 SDKs could sign a payment for their full balance of a supported token if a malicious API asked for it, security firm V12 said on October 22.
