<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sankou7</title>
    <description>The latest articles on DEV Community by Sankou7 (@sankou7_35e570098bbe76043).</description>
    <link>https://dev.to/sankou7_35e570098bbe76043</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259472%2Fed03dd73-ff21-4654-8a85-96238910a01f.png</url>
      <title>DEV Community: Sankou7</title>
      <link>https://dev.to/sankou7_35e570098bbe76043</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sankou7_35e570098bbe76043"/>
    <language>en</language>
    <item>
      <title>What a pre-signing gate can see in three x402 attack shapes</title>
      <dc:creator>Sankou7</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:56:14 +0000</pubDate>
      <link>https://dev.to/sankou7_35e570098bbe76043/what-a-pre-signing-gate-can-see-in-three-x402-attack-shapes-5dg2</link>
      <guid>https://dev.to/sankou7_35e570098bbe76043/what-a-pre-signing-gate-can-see-in-three-x402-attack-shapes-5dg2</guid>
      <description>&lt;h1&gt;
  
  
  What a pre-signing gate can see in three x402 attack shapes
&lt;/h1&gt;

&lt;p&gt;Three reported x402 failure shapes, one local offline preflight run, and the line between a client bug and a facilitator bug.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://v12.sh/blog/x402" rel="noopener noreferrer"&gt;V12's x402 write-up&lt;/a&gt; and &lt;a href="https://thehackernews.com/2026/10/critical-x402-sdk-flaw-could-let.html" rel="noopener noreferrer"&gt;The Hacker News coverage&lt;/a&gt; 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 &lt;code&gt;POST /preflight&lt;/code&gt; with a fake chain client. No live service was contacted and no payment was signed.&lt;/p&gt;

&lt;p&gt;For the overcharge, the fake payer held 10 USDC. With a malicious &lt;code&gt;10000000&lt;/code&gt; raw USDC request — $10, the whole fake balance — and &lt;code&gt;policy.maxAmountUsd: 0.25&lt;/code&gt;, the gate returned &lt;strong&gt;BLOCK&lt;/strong&gt;. The only reason was &lt;code&gt;amount_over_policy&lt;/code&gt; 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 &lt;strong&gt;CAUTION&lt;/strong&gt;, not PASS. Its one reason is &lt;code&gt;amount_above_default_cap&lt;/code&gt; at caution severity: “no price cap supplied; amount exceeds the x402 SDK default per-payment cap of $1; set policy.maxAmountUsd to override.” &lt;code&gt;sign_allowed&lt;/code&gt; is still true, and &lt;code&gt;requires_ack&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;For Solana, a payment shaped exactly like an &lt;code&gt;exact&lt;/code&gt; requirement — mainnet, canonical USDC mint, valid payee, resource — returned &lt;strong&gt;PASS&lt;/strong&gt; with empty reasons and &lt;code&gt;structural_only: true&lt;/code&gt;. Its structural reasons said there was no payment proof and that Solana preflight is structural: no slot binding and no balance check. &lt;code&gt;notChecked&lt;/code&gt; listed &lt;code&gt;solana slot binding&lt;/code&gt;, &lt;code&gt;payer_balance&lt;/code&gt;, 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 &lt;code&gt;approve(max)&lt;/code&gt; transaction is different: with default policy it returned &lt;strong&gt;CAUTION&lt;/strong&gt; with &lt;code&gt;unlimited_approval&lt;/code&gt; and &lt;code&gt;approval_unverified_spender&lt;/code&gt;; with &lt;code&gt;forbidUnlimitedApproval&lt;/code&gt; it returned &lt;strong&gt;BLOCK&lt;/strong&gt; with &lt;code&gt;unlimited_approval&lt;/code&gt; at block severity. That flags or blocks the EVM approval shape, not the Solana one.&lt;/p&gt;

&lt;p&gt;For sign-in, &lt;code&gt;login.evil.example&lt;/code&gt; placed in &lt;code&gt;payment.extra.siwxDomain&lt;/code&gt; was still ignored: the payment request returned &lt;strong&gt;PASS&lt;/strong&gt; with empty reasons. A new &lt;code&gt;kind: "sign-in"&lt;/code&gt; call with that domain in the message and &lt;code&gt;expected.host: "api.example"&lt;/code&gt; returned &lt;strong&gt;BLOCK&lt;/strong&gt; with &lt;code&gt;siwx_domain_mismatch&lt;/code&gt;: “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 &lt;code&gt;notChecked&lt;/code&gt;.&lt;/p&gt;

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

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

&lt;p&gt;verify402 is a free fail-closed pre-signing gate for x402 agents: &lt;a href="https://vex402.online" rel="noopener noreferrer"&gt;https://vex402.online&lt;/a&gt;. The gate and MCP client are open source (Apache-2.0); the paid check engines are hosted.&lt;/p&gt;

</description>
      <category>x402</category>
      <category>security</category>
      <category>ai</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
