Hardening x402: PII-Safe Agentic Payments via Pre-Execution Metadata Filtering
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
AI agents that pay for resources via the x402 protocol embed payment metadata - resource URLs, descriptions, and reason strings - in every HTTP payment request. This metadata is transmitted to the payment server and to the centralised facilitator API before any on-chain settlement occurs; neither party is typically bound by a data processing agreement. We present presidio-hardened-x402, the first open-source middleware that intercepts x402 payment requests before transmission to detect and redact personally identifiable information (PII), enforce declarative spending policies, and block duplicate replay attempts. To evaluate the PII filter, we construct a labeled synthetic corpus of 2,000 x402 metadata triples spanning seven use-case categories, and run a 42-configuration precision/recall sweep across two detection modes (regex, NLP) and five confidence thresholds. The recommended configuration (mode=nlp, min_score=0.4, all entity types) achieves micro-F1 = 0.894 with precision 0.972, at a p99 latency of 5.73ms - well within the 50ms overhead budget. The middleware, corpus, and all experiment code are publicly available at https://github.com/presidio-v/presidio-hardened-x402.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 1 of its 14 references that are in the map. First posted on arXiv 13 Apr 2026.
Builds on
1 of 14 references.
References · 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Beyond the Mandate: A Systematic Security Analysis of the Agent Payments Protocol (AP2)
- 2026Zero-Trust Runtime Verification for Agentic Payment Protocols: Mitigating Replay and Context-Binding Failures in AP2
- 2026TessPay: Verify-then-Pay Infrastructure for Trusted Agentic Commerce
- 2026APEX: Agent Payment Execution with Policy for Autonomous Agent API Access
- 2026Alipay-PIBench: A Realistic Payment Integration Benchmark for Coding Agents
- 2026Agentic Commerce Bench: Measuring Fraud Detection for Agents That Spend Money
- 2026Free-Riding the Agentic Web: A Systematic Security Analysis of x402 Payments
- 2026How Agentic Is Agentic Commerce? A Population-Scale Measurement of x402 Adoption and Authenticity