Beyond the Mandate: A Systematic Security Analysis of the Agent Payments Protocol (AP2)
Organizations: Ben-Gurion University of the Negev Beer-Sheva, Israel
Abstract
The Agent Payments Protocol (AP2), introduced by Google, enables large language model (LLM)-driven shopping agents to authorize and execute payments on behalf of users. Its signed Checkout and Payment Mandates protect the integrity of transaction data after signing. Agent interactions and external inputs that shape a transaction before authorization remain outside that protection, including Agent-to-Agent Protocol (A2A) messages and Model Context Protocol (MCP) tool calls. Prior work identified replay and prompt-injection attacks in AP2 v0.1. AP2 v0.2 addresses some of these issues but adds capabilities and deployment assumptions that require renewed analysis. We present a systematic security analysis of AP2 v0.2 based on its roles, transaction lifecycle, deployment architectures, and trust boundaries. We divide the lifecycle into five phases and identify five deployment architectures. Using MAESTRO (Multi-Agent Environment, Security, Threat, Risk, Outcome), we model four threat actors, eleven attack surfaces, eighteen adversary capabilities, and six attacker goals. The resulting catalog contains 48 threats spanning five attack families. We score these threats with the Artificial Intelligence Vulnerability Scoring System (AIVSS), identifying eight that reach the High band in at least one architecture. Because no complete public AP2 deployment was available, we build a testbed spanning all five architectures and develop five proof-of-concept demonstrations covering all eight High-risk threats and their mitigations. We also develop a deployment-aware scanner that maps applicable threats to static, cross-role consistency, and adversarial checks. Our analysis shows that valid mandate signatures alone do not ensure that an agent-mediated transaction reflects the user's intent when its pre-authorization context is manipulated.
Figures & tables
| Phase | Lifecycle function | Flow mapping |
|---|---|---|
| P1 Pre-Mandate Preparation | Before transaction-specific mandates exist, identities, signing keys, credentials, AgentCards (A2A discovery documents listing agent identity, endpoints, and capabilities), endpoint bindings, and trust anchors are established for mandate creation and verification. | Precondition for HP and HNP. |
| P2 Mandate Context Formation | The cart, payment options, and merchant-signed checkout are assembled for closed mandate formation. In HNP, prior open mandates constrain this context. | HP steps 1–4; HNP step 4. |
| P3 Mandate Authorization | Unsigned intent or constraints signed mandates. P3-U creates user-signed closed mandates in HP and user-signed open mandates in HNP; P3-A derives SA-signed HNP closed mandates constrained by their parents. | P3-U: HP steps 5–6 and HNP steps 1–2. HNP step 3 transitions from P3-U to P2. P3-A: HNP step 5. |
| P4 Mandate Verification & Consumption | Signed, unconsumed mandates verified signatures, mandate chain, constraints, checkout binding, expiration, and prior-consumption status, followed by credential issuance, settlement, and receipts. | HP steps 7–9; HNP step 6. |
| P5 Post-Transaction Retention | After execution, completed mandates, checkout records, and receipts are integrity-protected and retained as audit and dispute evidence. | Postcondition for both flows, beginning after receipt generation. |
| Code | Meaning | TA1 | TA2 | TA3 | TA4 |
| Keys | |||||
| ACK1 | Control of user_sk ; can produce user-signed mandates. | I | - | C | C |
| ACK2 | Control of agent_sk ; can produce HNP closed mandates. | C | - | C | C |
| ACK3 | Control of merchant_sk ; can sign checkout artifacts and receipts. | - | I | C | C |
| ACK4 | Control of CP/MPP verifier keys; can forge payment tokens or receipts. | - | - | I | C |
| Mandates & Tokens | |||||
| Surface | Core role | Risk / failure mode | MAESTRO |
|---|---|---|---|
| Role and Runtime Surfaces | |||
| S1: TS | UI surface trusted to render mandate content and obtain user consent before signing. | Mandate mismatch, consent bypass, or local key exposure ( user_sk , ACR2--4 ). | L4, L6 |
| S2: SA | SA for cart assembly, mandate construction, and payment execution. | Prompt injection, jailbreaks, or tool poisoning altering mandate generation fields. | L1–L4, L6, L7 |
| S3: MA | LLM-driven MA interacting with the SA over A2A. | Catalog/quote manipulation or tool tampering; signing compromise maps to ACK3 . | L1–L4, L6, L7 |
| S4: Merchant BE | Deterministic merchant backend system. | merchant_sk exposure, checkout state alteration, or marketplace isolation failure (A4: marketplace-front vs. sub-merchant backend instance). | L4, L6 |
| S5: CP | Scoped credential release authority. | Mandate check bypass, token leakage, or agentic prompt injection. | L4, L6 (Agentic: L1–L3, L7) |
| Goal | CVSS impact interpretation |
|---|---|
| AG1 Unauthorized payment | Integrity impact on the AP2 transaction and subsequent payment system. |
| AG2 Mandate-content manipulation | Integrity impact on mandate semantics and signed user intent. |
| AG3 Authorization-scope inflation | Integrity impact on the scope or reuse of authorization. |
| AG4 Confidentiality breach | Confidentiality impact on disclosed claims, payment metadata, or linkage data. |
| AG5 Repudiation | Integrity impact on evidence, receipts, and dispute artifacts. |
| AG6 Denial of authorized payment | Availability impact on completion of an authorized transaction. |
| Family | Full | Partial | Not elicited | Total |
|---|---|---|---|---|
| F1 Semantic | 4 | 2 | 4 | 10 |
| F2 Authority | 5 | 3 | 1 | 9 |
| F3 Supply-chain/trust-root | 5 | 4 | 4 | 13 |
| F4 State binding | 3 | 3 | 3 | 9 |
| F5 Accountability | 2 | 1 | 4 | 7 |
| Total | 19 | 13 | 16 | 48 |
| Statistic | Scope | Est. [95% CI] | Interpretation |
|---|---|---|---|
| Gwet’s AC2 (quad.) | all 25 | [0.963, 1.000] | LB exceeds 0.61 benchmark |
| Krippendorff’s (quad.) | all 25 | [0.520, 0.978] | High estimate; CI crosses 0.61 |
| Exact pairwise agreement | all 25 | [0.846, 0.980] | High observed agreement; no chance correction |
| Arch | Full | No- Pass. | No- CDSE | No- Adv | Only- Pass. | Only- CDSE | Only- Adv |
|---|---|---|---|---|---|---|---|
| A2 | .80 | .80 | .60 | .60 | .00 | ||
| A3 | .60 | .40 | .60 | .40 | .20 | ||
| A4 | .50 | .50 | .00 | .50 | .00 | .50 | .00 |
| A5 | 1.00 | .83 | 1.00 | .83 | .17 |
| Threat | Passive | CDSE | Adversarial |
|---|---|---|---|
| A2, Single-Agent with Isolated MCP | |||
| T-2 | 0/5 | 0/5 | 0/5 |
| T-4 | 0/5 | 0/5 | |
| T-8 | 0/5 | 0/5 | |
| T-34 | 0/5 | 4/5 | |
| T-5 | 0/5 | 0/5 | |