Share on XShare on LinkedInShare on Telegram
Security Decisions/ Before launchWeb3 Security

x402 Protocol Security: Auditing Agentic Payment Integrations

Researchers tested 15 x402 facilitators and found every one broke at least one security rule, uncovering 31 vulnerabilities. This guide explains how the x402 payment flow works, the four attack classes (free shopping, asset theft, service denial, gas abuse), other implementation gaps, and what to check before wiring agentic payments into your protocol.

Author
QuillAudits Team
•October 26, 2026
x402 Protocol Security: Auditing Agentic Payment Integrations
Share on XShare on LinkedInShare on Telegram

The decision · answer in brief

Researchers tested 15 x402 facilitators and found every one broke at least one security rule, uncovering 31 vulnerabilities. This guide explains how the x402 payment flow works, the four attack classes (free shopping, asset theft, service denial, gas abuse), other implementation gaps, and what to check before wiring agentic payments into your protocol.

x402 Protocol Security Vulnerabilities in Agentic Payments

Researchers testing 15 major x402 facilitators, representing roughly 99% of observed x402 transaction volume, found that every single one violated at least one of eight proposed security rules, producing 31 previously unknown vulnerabilities across four attack classes. That finding, published in the paper When HTTP 402 Meets the Blockchain: Risks on Emerging x402 Payments, is the clearest evidence yet of real x402 protocol security vulnerabilities sitting underneath a system marketed as production-ready for AI agent payments. This post walks through what x402 is, why its security model is already under pressure, and what you should check before wiring it into your payment flow.

What Is the x402 Protocol and How Does Agentic Payment Work?

x402 revives the long-dormant HTTP 402 "Payment Required" status code, originally reserved in the HTTP spec but never standardized, to let a server demand payment before it serves a resource. Instead of a human typing in a credit card number, the protocol is built for machine-to-machine micropayments: an AI agent or API client hits a paywalled endpoint, receives a 402 response, attaches a cryptographic payment proof, and retries the request, all without a person in the loop.

You'll often see x402 called "the Coinbase x402 protocol" in search results, and that's not entirely wrong. Coinbase originally built and published the project under its own coinbase/x402 GitHub repository, then handed governance to the newly formed x402 Foundation, which now maintains the open specification while Coinbase's repo continues on as a development fork. In practice, that means x402 is not a Coinbase-only product; it's an open standard that Coinbase helped originate and still actively contributes SDKs and facilitator infrastructure to.

The core design decision that matters for security is this: x402 doesn't verify or settle payments itself. It delegates both jobs to third-party "facilitator" services that sit between the client agent and the merchant server. That split is efficient, but it also means the protocol's actual security guarantees depend entirely on how consistently each facilitator implements verification and settlement, and the 2026 research shows that consistency isn't there yet.

The Three-Step x402 Payment Flow (Request, Verify, Settle)

The x402 flow breaks down into three steps:

  1. Request - An agent requests a resource from a server. The server responds with HTTP 402 and payment requirements (amount, token, chain, recipient address).
  2. Verify - The agent signs a payment authorization and sends it to a facilitator's /verify endpoint, which checks the signature and payment terms before the server releases the resource.
  3. Settle - The facilitator submits the transaction on-chain through its /settle endpoint, moving funds from the agent's wallet to the merchant.

On paper, that's a clean three-step handshake. In practice, the gap between "verify" and "settle" is exactly where several of the vulnerabilities below live, because the two calls aren't always treated as one atomic transaction.

Why Are x402 Protocol Security Vulnerabilities a Growing Concern?

x402 is still new enough that a formal academic research push only arrived in 2026, and it already found protocol-wide problems rather than isolated bugs in one implementation. The flagship study behind this post, When HTTP 402 Meets the Blockchain, built a semi-automated black-box testing tool and ran it against 15 facilitators, including Coinbase, Thirdweb, PayAI, and Mogami, and mapped 49 total violation instances across the four attack classes covered below.

The same research team empirically measured over 119 million Base and Solana transactions to quantify how adoption and centralization risk are developing around the protocol. That scale matters: x402 isn't a lab experiment anymore, it's already carrying real transaction volume through a small number of facilitators, which means a flaw in one widely used facilitator has an outsized blast radius. Two separate academic teams reached similar conclusions through different methods. Five Attacks on x402 Agentic Payment Protocol audited three open-source x402 SDKs and demonstrated weaknesses spanning authorization, binding, replay protection, and web-layer handling on local chains, Base Sepolia, and live endpoints. Free-Riding the Agentic Web found a more fundamental design gap: x402 signatures cryptographically bind funds to a merchant address, but not to a specific resource identifier, which means a valid payment proof can be replayed against a resource it was never meant to pay for.

Three independent research efforts converging on the same protocol within months of each other isn't noise. It's a sign that the gap between "x402 is live and processing payments" and "x402 has been hardened the way a payment rail should be" is still wide open, which is exactly the gap a project wiring agent-held funds into x402 inherits the moment it integrates.

What Are the Four Attack Classes Behind x402 Exploits?

The When HTTP 402 Meets the Blockchain study organizes its 49 violation instances into four attack classes, and the categories double as a checklist of what can go wrong when a protocol splits verification from settlement across separate services:

  • Free shopping - An agent receives a resource without the merchant ever being paid for it, or pays once and receives the resource many times.
  • Asset theft - Funds are diverted to an address the paying agent never authorized.
  • Service denial - A legitimate payment is rejected or stalled, blocking access to a resource the agent already paid for.
  • Gas abuse - An attacker forces the facilitator or merchant to burn gas on transactions that never need to settle, inflating operating cost.

The most concrete example is a validated free-shopping flaw rooted in inconsistent replay and freshness enforcement between a facilitator's /verify and /settle endpoints, as detailed in the cryptoslate report on the research. The /verify call is stateless and doesn't reserve the payment nonce at the moment it checks the signature. That leaves a window where a single valid payment proof can be replayed across many concurrent resource requests before the nonce is actually consumed on /settle. An agent that figures this out, intentionally or through a scripted retry loop, can pull multiple resources for the price of one. Researchers validated two free-shopping attack paths against live facilitators end-to-end and classified ten more as high-risk based on the same pattern.

That's complete payment bypass, not a theoretical edge case.

What Other Vulnerabilities Turn Up in an x402 Payment Protocol Audit?

Beyond the four headline attack classes, the research surfaces a handful of implementation gaps worth checking individually during an x402 facilitator vulnerabilities review:

  • Missing rollback on failed settlement. Dominant merchant SDKs, including the Coinbase x402 Flask SDK, lacked a rollback mechanism for failed settlements. That means a resource could already be delivered to the agent before the merchant's server learned that settlement had actually failed, effectively giving the resource away for free.
  • Unsigned HTTP 402 responses. An integration-level security review from Valkyrisec flags that the base 402 response isn't cryptographically signed, which opens the door to man-in-the-middle payment redirection. As the firm put it: "If an attacker can intercept and modify this response, they can redirect payments to their own addresses or inflate payment amounts."
  • Signature malleability and weak nonces. The same Valkyrisec review notes that ECDSA signature malleability and weak or predictable nonce generation sit on top of the base protocol as integration-layer risks, separate from whatever the facilitator itself does right.
  • Cost from reverts, not just theft. The flagship study's measurement window also captured a real operating cost from this fragility: roughly $202,000 in gas and fees, plus $5,800 tied specifically to reverted transactions, during the period researchers observed.

The upside in all of this: Coinbase, PayAI, and Mogami have acknowledged the disclosed issues, with some fixes already shipped and others in progress. That's the normal disclosure-to-patch cycle working as intended, but it's also a reminder that "patched this month" is a moving target, not a one-time guarantee, for any facilitator you plan to depend on. If you're already thinking about how much autonomy to grant an agent that holds spending authority, the same session-key and spending-limit questions covered in agentic wallet security apply directly to an agent that's about to start paying facilitators on its own.

What Should You Check Before Wiring x402 Into Your Payment Flow?

If your protocol or agent is about to integrate x402, treat the facilitator layer as a dependency you need to vet, not a black box you can trust by default. Before launch, confirm the following:

  1. Does the facilitator reserve the nonce at /verify, not just at /settle? If a payment proof stays valid for reuse between the two calls, you're exposed to the free-shopping replay pattern documented above.
  2. Does your merchant SDK roll back resource delivery on a failed settlement? If it doesn't, a failed or delayed settlement call can mean you already gave the resource away.
  3. Are payment signatures bound to the specific resource being requested, not just the merchant address? Unbound signatures are what made cross-resource substitution possible in the Free-Riding the Agentic Web findings.
  4. Is the HTTP 402 response itself signed or otherwise integrity-protected in transit? If not, you're relying entirely on transport-layer security to prevent payment redirection.
  5. Has the facilitator you're evaluating been named in the disclosed research, and if so, has the specific fix been confirmed shipped, not just acknowledged?
  6. Who audits the agent's own decision-making and spending logic, separate from the facilitator it talks to? An agent that correctly calls a hardened facilitator can still be manipulated into authorizing payments it shouldn't make.

That last point is where the audit scope needs to widen beyond the facilitator. QuillAudits' DeFAI Audit service is built around AI agents that actively execute transactions and manage funds on a user's behalf, covering data security, adversarial testing, API protection, and infrastructure validation, which lines up with the layer where an x402 agent's HTTP payment headers and /verify and /settle calls actually run. It's worth confirming directly with any auditor, including QuillAudits, that the engagement scope explicitly covers facilitator-integration concerns like nonce reservation and verify/settle atomicity, since those specifics aren't automatically implied by a general DeFAI agent review. And if the vulnerability lives inside a third-party facilitator's own code rather than in your agent or your contract, an audit of your side won't fix it; that risk only gets addressed by vetting the facilitator vendor directly or tracking its disclosed fixes.

Because the facilitator landscape is still being patched in response to live disclosures, a one-time pre-launch audit isn't enough on its own. Pairing it with continuous security monitoring and on-chain monitoring for settlement failures and nonce or replay anomalies gives you a way to catch a facilitator-side regression after launch, not just at integration time. For a protocol this new, running a bug bounty program alongside an audit also makes sense, since the research itself was produced by outside teams finding flaws the facilitators hadn't caught internally. QuillAudits' general web3 security checklist is a useful baseline to run alongside the x402-specific checks above.

Final Thoughts

x402 solves a real problem: giving autonomous agents a standard way to pay for resources without a human approving every transaction. But the research covered here, 31 vulnerabilities across 15 facilitators, four named attack classes, and resource-leakage ratios reaching complete payment bypass in tested scenarios, shows that "live and processing transactions" isn't the same claim as "secure by design." If you're integrating x402, treat the facilitator you choose as part of your attack surface, not a trusted utility, and revisit that choice as disclosures and patches continue to land. For a closer look at how QuillAudits approaches agent-level financial risk, visit the QuillAudits research hub.

Explore more Security Decisions

Contents

Tell Us About Your Project
Subscribe to Newsletter
hashing bits image
Loading...

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC