RemitBot Research · Research summary
x402 Security Risks: What the Published Research and Open Issues Show (October 2026)
A dated, sourced summary of what researchers and the x402 issue tracker have documented. Research findings, not reported production losses.
By StratEdge Workflow Systems · Published October 4, 2026 · Facts as of October 4, 2026
How x402 is put together
x402 extends HTTP 402 ("Payment Required"). A resource server answers a request with payment requirements, the client returns a signed payment payload, and a facilitator verifies the payload and settles it on-chain[8]. Wang et al. put the consequence this way: facilitators "serve as a shared payment infrastructure for many independent merchants. This centralizes trust and validation in one component, so a single flaw can affect many services"[1].
The facilitator study (Wang et al., July 2026)
Qinying Wang, Yong Yang, Yuan Chen, Shouling Ji and Mathias Payer, "When HTTP 402 Meets the Blockchain: Risks on Emerging x402 Payments", arXiv:2607.19545, submitted 21 July 2026. The arXiv record lists USENIX Security 2026 as its journal reference[1]. What the paper reports:
- Eight security rules for facilitators.SR1 to SR4 cover authorization: proofs must match the server's requirements, payer authorization and balance must be valid, freshness must be enforced, and success must not be reported unless the payment condition holds. SR5 to SR8 cover execution: reject payments that can't settle or are economically meaningless, bound sponsor-paid costs, re-check time- and state-dependent conditions before settlement, and restrict on-chain execution to well-defined payment semantics.
- Every facilitator tested broke at least one rule.The 15 facilitators are "collectively used by over 60K sellers and 360K buyers" and, per the authors, account for 99% of x402 transactions. The authors report 49 rule violations, which they translate into 31 previously unknown vulnerabilities. Every rule was broken by at least one platform.
- Four attack classes:Free Shopping, Asset Theft, Service Denial and Gas Abuse. The authors rank sponsor-paid cost amplification and free shopping as the most common practical risks. Asset theft is rarer but has the highest impact. They attribute free shopping to "release-after-verify" behavior in merchants and SDKs: the resource is delivered after verification but before settlement succeeds.
- Disclosure.The affected parties "acknowledged the issues and adopted mitigations, including changes by Coinbase."
- On-chain measurement.Across more than 119 million Base and Solana transactions, x402-related settlement attempts had "burned over $202K in gas and fees, including $5.8K from reverting submissions alone". The authors treat this "as risk evidence rather than attack attribution."
Other published x402 research
| Paper | What it reports | Status |
|---|---|---|
| Li, Wang, Wang, "Five Attacks on x402 Agentic Payment Protocol", May 2026[2] | Five attacks on authorization, binding, replay protection and web-layer handling. Validated on local chains, Base Sepolia and live endpoints, plus an audit of three open-source SDKs. Outcomes are unpaid service or paid-but-denied. | Preprint |
| Ling et al., "Free-Riding the Agentic Web", May 2026 (v2 June)[3] | Four flaw classes: cross-resource substitution, duplicate-settlement race, allowance overdraft (on the upto scheme) and denial of settlement. Against official SDKs and a production deployment, resource-leakage ratios reached up to 100%. At the time of the authors' audit, none of the four official Coinbase SDKs enforced a sound resource-binding check. | All findings disclosed, per the authors |
| Jiang et al., "A Formal Analysis of Agent Payment Protocols", August 2026[4] | Tamarin models of x402, MPP, ACP and AP2. Across 86 verification cases, 40 previously undocumented formal-consistency findings. Ten were validated through proofs of concept, SDK or schema witnesses, or executable traces. | Preprint |
Fail-open hook behavior (open as of October 4, 2026)
The x402 TypeScript packages let extensions run hooks before and after verification and settlement. Two open threads in the x402 Foundation repository concern what happens when a hook throws an error.
Issue #3689 (opened October 4, 2026). In the @x402/core resource server, when a hook throws in beforeVerify or beforeSettle, "the exception is logged and the loop continues as if the hook had passed. The payment then verifies and settles normally." In beforeSettle, only SettleError is rethrown. The reporter reproduced this against main at commit 751590a(October 2, 2026), using the package's own unit-test mocks. A throwing onBeforeVerify hook still returns isValid: true. The issue proposes three options. A throw in a gate phase could count as an abort. Extensions could declare that their gates fail closed. Or the current behavior could be documented. The reporter prefers the first[5]. When we checked on October 4, the issue had no comments.
Pull request #3151 (opened August 14, 2026; not merged). This PR addresses issue #1826, which reported that a throwing afterSettle hook made a payment that had already settled on-chain look like a failure[7]. The PR wraps all six facilitator hook loops so that a throwing hook is logged and skipped, "mirroring the resource server's pattern." The intentional beforeSettle abort is still honored. Under the PR, a throwing beforeVerify or beforeSettlehook "does not stop later hooks"[6].
Our reading.The two threads aren't in conflict. Isolating errors in after-hooks keeps a settled payment from being reported as failed. Applying the same "log and skip" rule to before-hooks means a gate that couldn't finish its check lets the payment through. One approach that fits both: isolate advisory hooks, and fail closed on gate hooks. This is a description of open threads, not a statement about any deployment.
Controls for teams integrating x402
- Decide when you release the resource. If you can't tolerate free shopping, release only after settlement is confirmed, or cap the value you'll deliver before then.
- Don't treat the facilitator's answer as final. Re-check the amount, asset, payee and network against your own payment requirements.
- Until upstream behavior changes, wrap every gate-phase extension hook so that any error returns an abort. Add a test that throws inside the hook and confirms the payment is refused.
- Re-validate time- and state-dependent conditions just before settlement, not only at verification.
- If you operate a facilitator, put limits on sponsor-paid gas and fees, and restrict settlement to well-defined payment calls.
- Bind each payment to one resource and one use. Reject replayed or substituted authorizations.
- For upto-style allowances, reserve and decrement the allowance atomically instead of checking a snapshot.
- Record verify and settle outcomes separately in your audit log, so a hook failure after settlement can't hide a completed payment.
- Pin SDK versions and track the issues above. Re-test hook behavior on every upgrade.
For limits on what an agent may spend, see AI agent spending limits. The Agent Payment Risk Index[9] lists these papers as research findings, not production losses.
How RemitBot approaches this
RemitBot is a live payment-control platform for agent-to-agent transactions, built by StratEdge Workflow Systems. It is designed to make its own policy decision on identity, intent, limits and counterparty before an agent pays, separate from any facilitator's result. It returns Approve, Hold or Block and keeps an audit record of the rules that fired.
Sources
- Wang, Yang, Chen, Ji, Payer, “When HTTP 402 Meets the Blockchain: Risks on Emerging x402 Payments”, arXiv:2607.19545 (21 July 2026; arXiv journal reference: USENIX Security 2026)
- Li, Wang, Wang, “Five Attacks on x402 Agentic Payment Protocol”, arXiv:2605.11781 (12 May 2026, preprint)
- Ling, Huang, Du, Chen, Zhou, Wu, Wang, “Free-Riding the Agentic Web: A Systematic Security Analysis of x402 Payments”, arXiv:2605.30998 (v2, 22 June 2026)
- Jiang, Yu, Chang, Jangid, Niu, Wang, Zhang, “A Formal Analysis of Agent Payment Protocols”, arXiv:2609.00060 (30 August 2026)
- x402 issue #3689, “a throwing beforeVerify/beforeSettle hook is ignored, so extension gates fail open” (opened 4 October 2026)
- x402 pull request #3151, “fix(core): isolate facilitator lifecycle hook errors” (opened 14 August 2026)
- x402 issue #1826, “afterVerify and afterSettle hooks lack error isolation” (opened 26 March 2026)
- x402 Foundation, x402 specification v2 (repository commit e187dda, 31 August 2026)
- StratEdge Workflow Systems, Agent Payment Risk Index 2026 (updated 2026-09-25)
How to cite
StratEdge Workflow Systems (2026). x402 Security Risks: What the Published Research and Open Issues Show (October 2026). https://remitbot.ai/research/x402-security-risks. Published October 4, 2026. Accessed [date].
For individual facts and figures, cite the primary source listed above.