Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

What a pre-signing gate can see in three x402 attack shapes

What a pre-signing gate can see in three x402 attack shapes Three reported x402 failure shapes, one local offline preflight run, and the line between a client bug and a facilitator bug. V12's x402 write-up and The Hac

What a pre-signing gate can see in three x402 attack shapes

Three reported x402 failure shapes, one local offline preflight run, and the line between a client bug and a facilitator bug.

V12's x402 write-up and The Hacker News coverage describe three failure shapes: a client that would sign a payment up to the wallet's full balance, a Solana facilitator that accepted a token approval as payment, and a sign-in message whose domain differs from the host that sent the challenge. The first and third are client-side; the second is facilitator-side. I ran those shapes through a local offline copy of verify402's POST /preflight with a fake chain client. No live service was contacted and no payment was signed.

For the overcharge, the fake payer held 10 USDC. With a malicious 10000000 raw USDC request β€” $10, the whole fake balance β€” and policy.maxAmountUsd: 0.25, the gate returned BLOCK. The only reason was amount_over_policy at block severity: β€œamount is $10.000000, above policy.maxAmountUsd $0.25.” The same request with no cap and no seller terms manifest now returns CAUTION, not PASS. Its one reason is amount_above_default_cap at caution severity: β€œno price cap supplied; amount exceeds the x402 SDK default per-payment cap of $1; set policy.maxAmountUsd to override.” sign_allowed is still true, and requires_ack is true, so an executor must surface it. An explicit cap keeps the earlier hard BLOCK. The gate flags or blocks this request shape when the amount is visible and priced in a known dollar stable; it still cannot know a seller's fair price.

For Solana, a payment shaped exactly like an exact requirement β€” mainnet, canonical USDC mint, valid payee, resource β€” returned PASS with empty reasons and structural_only: true. Its structural reasons said there was no payment proof and that Solana preflight is structural: no slot binding and no balance check. notChecked listed solana slot binding, payer_balance, payment proof, and seller terms. The checks that did run covered scheme, network, asset, amount, payee, resource URL and resource host. The gate does not decode Solana instructions, so it cannot tell a transfer from an approval. That flaw is facilitator-side, and this gate does not flag this Solana payment shape. An EVM approve(max) transaction is different: with default policy it returned CAUTION with unlimited_approval and approval_unverified_spender; with forbidUnlimitedApproval it returned BLOCK with unlimited_approval at block severity. That flags or blocks the EVM approval shape, not the Solana one.

For sign-in, login.evil.example placed in payment.extra.siwxDomain was still ignored: the payment request returned PASS with empty reasons. A new kind: "sign-in" call with that domain in the message and expected.host: "api.example" returned BLOCK with siwx_domain_mismatch: β€œmessage domain "login.evil.example" does not match expected.host "api.example".” It blocks this request shape when the caller supplies the expected host. The same response showed the nonce, one-hour time window, expected chain and expected address as checked; only the domain binding failed. It does not check whether the site is legitimate, whether the nonce came from the server, replay state, or what the login grants; all four now appear in notChecked.

These are additive checks, not a guarantee. They flag or block the request shapes shown; they do not make the counterparty honest.

The fixes shipped in the x402 SDKs' August 2026 releases; update to them. A gate is a second layer, not a substitute for patching.

verify402 is a free fail-closed pre-signing gate for x402 agents: https://vex402.online. The gate and MCP client are open source (Apache-2.0); the paid check engines are hosted.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.