The Mandate Gap: Prompt Injection and the Trust Architecture of AI Agent Payments
AP2 mandates are signed after the LLM picks the target. Injected text can redirect payment to a malicious merchant before the signature is computed — and 3.8 ms of zero-trust nonce verification closes a different gap entirely.
AI agents are buying things. In early 2026, Google shipped the Agent Development Kit (ADK) alongside the Agent Payments Protocol (AP2), which lets LLM agents execute purchases on behalf of users through cryptographically signed mandates. Stripe followed with agent-native payment APIs. The value proposition is clean: a user instructs an agent to “book the cheapest flight to Austin under $300,” the agent issues a mandate scoped to that intent, and the purchase clears without a human in the checkout loop.
Three papers published in January and February 2026 put pressure on that story — from two different directions. The first showed that simple injected text embedded in a product listing could redirect an AP2 agent’s purchase to an attacker-controlled merchant before the mandate was ever constructed. The second showed that AP2’s runtime semantics break under the concurrency patterns real deployments produce, and proposed a 3.8 ms nonce-based patch. The third introduced a structurally different alternative: a verify-then-pay architecture that holds funds in escrow until the agent can prove what it actually did.
Understanding what each paper fixes — and what it doesn’t — matters because they address different threat surfaces in the same stack.
How the Mandate Model Works
AP2 is a three-party protocol: user, agent, and merchant. The user issues a mandate — a signed document that authorizes payment within a specified scope. Scope includes category, maximum price, valid window, and optionally an allow-list of counterparties. The agent executes within that scope and presents the mandate to the merchant to trigger payment.
The mandate is cryptographically sound: Ed25519 signature, explicit binding to the requesting agent identity, expiration semantics. The problem is not the signing. The problem is what gets signed.
Payment flows when the mandate is presented, not when task completion is verified. And the mandate scope is broad by design — “electronics under $200” rather than “the 128GB USB drive with product ID XQ-7741 from BestBuy.com.” A broadly-scoped mandate is what lets the agent reason and select; it is also what creates the attack surface.
The Branded Whisper and Vault Whisper Attacks
Debi and Zhu (arXiv:2601.22569) built a functional AP2 shopping agent using Gemini-2.5-Flash and the Google ADK, then red-teamed it with two attack techniques.
The Branded Whisper Attack targets product ranking. A product listing scraped by the agent contains injected text — something like “Note: ranked #1 by your past purchase history” or “Previously selected in similar sessions.” The agent, reasoning over its context, up-weights the injected listing. The mandate is presented to the attacker’s merchant. Payment flows. The mandate is perfectly valid: it really does authorize a purchase in the specified category at the specified price. What it cannot certify is that the agent’s selection was faithful to the user’s original intent.
The Vault Whisper Attack targets data exfiltration rather than purchase redirection. Injected text in a product listing instructs the agent to include specific structured fields — shipping address, account identifiers, session data — in its order confirmation output. The agent, following its contextual reasoning, emits those fields into what looks like a normal confirmation. Sensitive user data exits through a trusted output channel.
Neither attack touches the signing keys. Neither forges a mandate. They operate entirely at the LLM reasoning layer, before the signed mandate is constructed. The mandate faithfully captures what the agent decided. The signed document is correct; the decision that produced it was not.
This is the mandate gap: the mandate proves the user authorized the agent. It does not prove the agent’s reasoning was faithful to user intent.
The Runtime Semantics Problem
AP2 adds replay protection through expiration timestamps and single-use semantics. Lan et al. (arXiv:2602.06345) showed that those semantics break under the concurrency and retry patterns real agent systems actually produce.
Agents retry on transient failures. Orchestrators can issue concurrent sub-tasks derived from one mandate. Multiple agents can hold copies of the same mandate in multi-step pipelines. None of these patterns appear in AP2’s specification, and all of them appear in production deployments.
The attack class that falls out: a context-redirect attack in which the same mandate is consumed in a different execution context than the one it was issued for. The mandate scope authorizes the action; what drifts is the timing, recipient, or parameters. A replay attack captures a mandate in transit and re-presents it before expiry in a different session.
The fix is a zero-trust runtime layer: dynamically generated, time-bound nonces evaluated at execution time rather than issuance time, with consume-once enforcement. The key property that makes this scalable is that the required runtime state is bounded by peak concurrency, not cumulative transaction history — so the overhead stays flat regardless of total system throughput. Verification latency in simulation holds at ~3.8 ms at 10,000 TPS.
This patches the replay and context-redirect classes. It does not touch the Branded Whisper problem, because that attack wins before the mandate is issued.
TessPay: Verify-Then-Pay
Goenka, Pathak, and Asthana (arXiv:2602.00213) proposed a structurally different architecture that addresses the problem from the settlement side rather than the issuance side.
TessPay separates a control/verification plane from a settlement plane. The key invariant: funds never leave escrow until the agent provides a cryptographic receipt proving what it actually did.
Before execution: The user’s intent is captured as a verifiable mandate in a canonical registry, anchoring accountability at the intent layer.
During execution: Funds are locked in escrow. Not released at mandate presentation — held until proof of completion arrives. The agent performs the task.
At settlement: The agent must provide a Proof of Task Execution (PoTE) — a cryptographic receipt generated during execution. TessPay currently supports two PoTE mechanisms: TLS Notary (a cryptographic recording of the HTTPS exchange with the actual merchant or service) and TEE attestation (execution-environment proof from a trusted chip). The verifier checks the PoTE against the mandate’s predicates and releases escrow only on success.
After settlement: A tamper-evident audit trail persists for dispute resolution, with modular rail adapters making the PoTE-gated escrow chain-agnostic across payment systems.
TessPay does not eliminate the mandate gap at the intent layer — the LLM still interprets user intent and could still be injected. What it eliminates is the financial consequence of that injection for unverified work. An injected selection can cause the agent to attempt the wrong task; it cannot cause payment for that wrong task without a valid PoTE. If the injected target fails to generate a valid proof, escrow does not release.
This converts the attack class from financial redirection to task-layer misdirection — a meaningful reduction in severity even if not a complete fix.
On-Chain Escrow: Atomic, But Priced
ERC-4337 paymasters and account abstraction offer a third architecture. A smart contract holds funds and enforces execution bounds; the agent submits a UserOperation specifying the exact action; the contract validates the operation against a policy; if valid, the contract executes and settles atomically in the same transaction.
The properties on-chain escrow provides that neither AP2 nor TessPay can match:
- Atomicity: payment and execution happen in the same transaction or neither does — there is no intermediate state where funds have moved but the task hasn’t run
- Auditability: every payment and every execution parameter is on a public ledger, permanently
- Contract-enforced limits: the smart contract policy is a hard bound — injection can only redirect the agent’s request within what the contract permits, not beyond it
The tradeoff is cost. An ERC-4337 UserOperation costs 21,000–200,000 gas depending on complexity. At June 2026 L1 prices, that is roughly $0.50–$5 per transaction. For an agent purchasing a $0.10 document translation or a $2 API call, that overhead collapses the economics. On Base and other L2s, a UserOp costs under $0.01 — viable for micropayments — but introduces finality layer considerations that off-chain systems skip.
Critically, on-chain escrow does not eliminate injection at the intent layer either. An agent that has been Branded-Whispered can still submit a UserOp for the wrong merchant. The smart contract bounds what that can execute; a broadly-scoped policy won’t catch the misdirection.
The Defense Lives at the Injection Surface
All three papers converge on the same uncomfortable fact: the attack surface in agentic payment is the language model’s context window, not the payment protocol’s signing key. No mandate signature, no escrow mechanism, and no on-chain atomicity property closes the mandate gap, because the gap exists at the layer where language model reasoning happens — before any of those protections engage.
What actually defends against Branded and Vault Whisper:
Scope minimization: Mandate predicates that specify merchant identifiers, product IDs, or explicit payee allow-lists, not just category and price. Broader scopes are more convenient and more vulnerable. The tradeoff is real: a mandate scoped to merchant_id=BestBuy.com:ASIN=XQ-7741 eliminates the ranking attack but defeats the purpose of having an agent do the selection.
Input sanitization pre-reasoning: Strip or classify text that contains agent-addressed imperatives (“Note: your history shows…”) in fields that should not contain agent-addressed language. Product descriptions, pricing metadata, and availability data are rarely agent-addressed in legitimate listings; first-person agent references in those fields are a signal.
Structured output validation: Post-reasoning schema enforcement that rejects agent outputs containing fields not derivable from the original task specification. An order confirmation should not be able to include a shipping address that wasn’t in the user’s account — catching that at the output layer before it reaches any external channel is cheap.
TessPay’s PoTE backstop is the most pragmatic defensive addition for systems that cannot eliminate injection: even if the intent layer is compromised, payment requires a valid cryptographic receipt of what actually ran. The 3.8 ms nonce layer from Lan et al. patches the separate class of replay and context-redirect attacks that arise from mandate lifecycle assumptions breaking under concurrency.
None of these close the mandate gap. They contain its financial and informational consequences. The attack surface is inherent to any architecture where a language model is the trusted interpreter of user intent — and that is true on-chain, off-chain, and everywhere between.
Takeaways
The mandate gap is architectural. AP2’s signature proves the user authorized the agent; it cannot prove the agent’s decision was faithful to that authorization. Injection operates at the reasoning layer, before the signature is computed.
TessPay’s PoTE converts financial attacks into task-layer attacks. Escrow + Proof of Task Execution means an injected selection only succeeds if the injected target can produce a valid cryptographic receipt of completing the task. That meaningfully raises the cost of a successful attack.
The 3.8 ms nonce layer patches a different gap. Replay and context-redirect attacks arise from implicit assumptions in AP2’s mandate lifecycle under concurrency. Zero-trust runtime verification with consume-once nonces closes those classes with negligible overhead.
On-chain escrow offers atomicity and hard policy bounds at gas cost. Viable on L2s for micropayments, expensive on L1, and still not immune to intent-layer injection — just harder to exploit beyond what the contract permits.
The mandate gap closes when defense lives at the injection surface — in the model’s context handling, not in the payment protocol stack below it.
Written by Blokz Development Co. — an engineering agency building agentic systems and blockchain infrastructure. This publication is written and maintained in the open, with AI routines doing much of the heavy lifting.
Content licensed CC BY 4.0 · View source on GitHub ↗