Documentation Index
Fetch the complete documentation index at: https://mandatez.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The Vercel/Context.ai Breach — What Happened and How to Prevent It
On April 19, 2026, an AI indexing agent built by Context.ai — installed into thousands of Vercel customer projects via a sanctioned OAuth integration — became the pivot point for a credential exfiltration that exposed environment variables, database keys, and third-party API tokens across hundreds of customer projects. Public reporting suggests detection lag of approximately nine days. Cause: an over-scoped OAuth token attached to an agent with no verifiable identity and no governance layer watching what it actually did. This page is a concise technical breakdown of the incident, its exact mapping to the OWASP Agentic Security Initiative taxonomy, and the five-minute MandateZ configuration that closes the failure mode structurally. For the long-form case study with full commentary, see The Vercel Breach Was an AI Agent Governance Failure.The Attack Chain
Stage 1 — Over-Scoped OAuth Token
Context.ai’s indexing agent was authorized against each customer’s Vercel team with an OAuth token that carriedproject:read, deployment:read, and — the crux of the incident — env:read scope at the team level. The token was issued once, stored server-side at Context.ai, and never rotated.
Stage 2 — Vendor Compromise and Token Replay
When Context.ai’s infrastructure was compromised, the attacker exfiltrated the OAuth tokens. Because OAuth bearer tokens are transferable by design — possession equals identity — the attacker replayed each token against Vercel’s API from their own infrastructure. Vercel’s API had no way to distinguish the replay from a legitimate call.Stage 3 — Cross-Project Enumeration
Theenv:read scope spanned every project in the installing user’s team. The attacker iterated: GET /v9/projects/*/env across hundreds of projects per token. Environment payloads contained production Supabase keys, Stripe secrets, Anthropic and OpenAI API keys, and long-lived S3 service-account tokens.
Stage 4 — Delayed Detection (Inferred from Public Reporting)
At no point did the enumeration look anomalous to Vercel’s API, because the token was valid. The anomaly was visible only at the agent layer — an indexing agent that historically performed read-only operations on a single project was now iterating every project in the team. No system at Vercel was measuring the agent’s own behavior distribution. Public reporting suggests a detection lag of approximately nine days between exfiltration and discovery.The OWASP Mapping
The Vercel/Context.ai incident is a textbook stacking of two OWASP Agentic Security Initiative categories.ASI-02 — Insufficient Authorization
The failure: OAuth scope collapsed two semantically different actions — “read metadata for the installed project” and “read every environment variable in the team” — into a singleenv:read permission. The agent was authorized at the session level, not the action level.
The requirement ASI-02 states: an agent must be authorized per action, not per session. Agent frameworks that inherit a user’s OAuth scope inherit far more than the agent actually needs.
ASI-03 — Identity Abuse
The failure: The token had no agent identity attached. When the attacker replayed it from a different IP, ASN, and user agent, Vercel’s API had nothing to compare against. There was no public key, no signature, no non-transferable identity — just a bearer secret whose possessor was the agent. The requirement ASI-03 states: every agent must carry a verifiable, non-transferable identity. OAuth bearer tokens fail this requirement structurally because they are transferable by whoever possesses them. The stacking is what made the incident catastrophic. ASI-02 made the blast radius huge. ASI-03 made the pivot invisible. Fixing either one alone would have ended the attack on day zero. See the full OWASP Agentic Top 10 Compliance mapping for how MandateZ addresses every ASI category.The Exact MandateZ Policy That Blocks It
MandateZ policies evaluate before any action executes. A least-privilege policy on the indexing agent would have refused Stage 1 outright.- Default-deny (rule
r5) — anything not explicitly allowed is blocked. The attacker cannot pivot into a resource class nobody enumerated. env/*is blocked at the resource-pattern level (ruler3) — independent of OAuth scope. MandateZ enforces semantic scope, not session scope.- Cross-project reads flag for human approval (rule
r4) — the second project the attacker touched would have paused for a Slack approval that would never arrive.
Ed25519 vs OAuth Bearer Tokens
The deeper fix is replacing bearer tokens with signed identities. OAuth bearer tokens are transferable; Ed25519 signatures are not.| OAuth Bearer Token | Ed25519 Agent Identity | |
|---|---|---|
| Proves possession | Sending the token | Signing with private key |
| Transferable | Yes — bearer is identity | No — signature is identity |
| Replay detection | Requires IP/ASN heuristics | Built in via event ID + timestamp |
| Scope boundary | OAuth scope (per-session) | Policy rules (per-action) |
| Revocation blast radius | Every caller of the token | One agent only |
| Cross-vendor verification | Requires shared auth server | Public-key verification, no server |
| Anomaly detection surface | API layer | Agent layer (signed event stream) |
OAuth — Attacker with the Token Is the Agent
MandateZ — Signature Binds the Action to the Agent
How to Implement in Five Minutes
If you run any agent today — an indexing bot, a support agent, a deployment webhook handler — here is the minimum configuration that closes the Vercel-class failure mode.Step 1 — Install
Step 2 — Generate the Agent’s Identity
Step 3 — Wire the Client with a Least-Privilege Policy
Step 4 — Replace Direct API Calls with client.track()
LangChain or CrewAI user? Drop in the integrations callback instead of
wrapping calls manually — every tool call is tracked automatically.
See the Python SDK for the one-line setup.
Step 5 — Watch the Dashboard
Every agent action streams in, signed, policy-checked, trust-scored. If a Vercel-class attack begins, the blocked-event spike is visible within 30 seconds. The approximately nine-day detection lag suggested by public reporting becomes under five minutes.Frequently Asked Questions
What happened in the Vercel/Context.ai breach?
On April 19, 2026, an AI indexing agent built by Context.ai was compromised at the vendor, and its OAuth tokens were replayed by an attacker against Vercel’s API. The token carried team-wideenv:read scope, letting the attacker enumerate environment variables across hundreds of customer projects. Public reporting suggests a detection lag of approximately nine days.
Was the Vercel breach a credential hygiene failure?
No. It was a governance failure. The credential was valid and used through its legitimate API. The underlying issues were that the OAuth token granted team-wideenv:read scope rather than per-action authorization (OWASP ASI-02), and that the agent carried no verifiable identity so the replay was indistinguishable from legitimate traffic (OWASP ASI-03).
Which OWASP categories does the Vercel breach map to?
OWASP ASI-02 (Insufficient Authorization) because the OAuth scope collapsed many actions into one permission, and OWASP ASI-03 (Identity Abuse) because the bearer token had no non-transferable agent identity attached.How would MandateZ have prevented the Vercel breach?
Three stacked controls would have ended the attack. A policy rule blockingvercel/**/env/* at the resource-pattern level would have refused Stage 1. A policy rule flagging any cross-project read for human approval would have paused Stage 3. An Ed25519-signed agent identity instead of an OAuth bearer token would have made the Stage 2 replay cryptographically detectable.
What is the difference between an Ed25519 identity and an OAuth token?
An OAuth bearer token is transferable — whoever holds it is the agent from the server’s perspective. An Ed25519 identity binds each action to a signature produced by a private key that never leaves the agent’s runtime. A stolen event cannot be replayed from a new environment, and the server can verify every action against the agent’s registered public key without a shared secret.How long does MandateZ take to implement against this failure mode?
Five steps, under five minutes per agent: install the SDK, generate an identity, wire the client with a least-privilege policy, replace direct API calls withclient.track(), and open the dashboard. The Context.ai failure mode is structurally closed after Step 3.
Does MandateZ work with existing agent frameworks like LangChain or n8n?
Yes. MandateZ is vendor-neutral. The SDK wraps LangChain, n8n, AutoGen, and CrewAI out of the box, and can wrap any framework that exposes an async action boundary. The same policy configuration applies regardless of which framework runs the agent.How does MandateZ detect the attack in real time?
Three signals fire within the first minute of a Vercel-class attack. One, the per-agentblocked_rate_per_minute metric crosses threshold as the attacker’s enumeration loop hits hundreds of blocked reads. Two, the agent’s trust score Behavioral Consistency component collapses as action distribution deviates from baseline. Three, the oversight queue fills with hundreds of pending cross-project-read approvals that no human approves.
Prevent the Next Vercel Breach
Install
@mandatez/sdk and close the Context.ai failure mode on your own agents in under five minutes.