OWASP ASI03 Identity and Privilege Abuse: one identity per agent, checked at use

Inherited credentials, confused deputies, made-up agent names and approvals that go stale. How one key per agent, scopes and a check at the moment of use close those gaps.

· 8 min read

ASI03 Identity and Privilege Abuse is the third risk in OWASP’s Top 10 for Agentic Applications. OWASP calls it “the agentic evolution of Excessive Agency” and traces it to one mismatch: identity systems were built for people, and agents run on borrowed identities. “Without a distinct, governed identity of its own, an agent operates in an attribution gap that makes enforcing true least privilege impossible.”

Identity here means both the agent’s persona and the material that stands for it: API keys, OAuth tokens, a user’s session the agent was handed. Where ASI02 is an agent misusing rights it was given, ASI03 is an agent ending up with rights it should never have had.

Five ways it happens

Inherited privilege
A manager agent hands a task to a narrow worker and passes its full access along with it.
Remembered credentials
An agent keeps SSH credentials from one job in memory, and a later user talks it into reusing them.
Confused deputy
A forged email asks the mail-sorting agent to tell the finance agent to pay. The finance agent trusts its colleague and pays.
Checked at start, used later
A purchase is approved at the start of a workflow. Hours later the spending limit is cut, and the workflow buys anyway.
Made-up identity
An agent calling itself “Admin Helper” is trusted because of its name.

Give each agent its own key

OWASP’s first mitigation is task-scoped, time-bound permissions “using per-agent identities and short-lived credentials”. For the question of who may ask for what, that means one key per agent, limited to that agent’s actions, with an end date:

# One key per agent, limited to the actions that agent takes.
curl -X POST https://api.variantgate.com/v1/workspaces/WORKSPACE_ID/agent-keys \
  -H 'authorization: Bearer YOUR_SESSION_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
    "name": "procurement-agent",
    "scope": ["purchase.*"],
    "expires_at": "2027-03-01T00:00:00Z"
  }'

# The same key asking for something outside its scope:
HTTP/1.1 403 Forbidden
{ "error": { "code": "action_out_of_scope",
  "message": "this agent key may only ask for: purchase.*" } }
  • Rules follow the key, not the name. An agent can call itself anything in a request. A rule written for one agent matches the key it asks with, so “Admin Helper” gets nothing it did not already have.
  • A key can only ask. An agent key cannot list the inbox, decide a request, or touch rules, so an agent that takes over another’s key still cannot approve its own work.
  • Who decided comes from sign-in. The person recorded as deciding is the signed-in person who pressed the button, never a name that arrived in the request body.

This key only governs asking. The credentials your agent uses on the database, the payments API or the cloud still need their own scoping and short lifetimes, which is the larger half of the first mitigation.

Approve at the moment of use

The “workflow authorization drift” scenario is a time-of-check to time-of-use bug: the approval was right when it was given and wrong when it was used. OWASP’s answers are to “re-verify each privileged step” and to require human approval for “high-privilege or irreversible actions”. In code, ask in the step that acts, with the facts as they are now:

// Ask at the step that spends, with the order as it stands now,
// not once when the workflow starts.
async function placeOrder(order: Order) {
  await approvals.guard(
    {
      action: "purchase.create",
      summary: `Buy ${order.quantity} × ${order.item} from ${order.vendor} for €${order.total}`,
      amount: order.total,
      currency: "EUR",
      details: { requested_by: order.requester, source: order.sourceMessageId },
    },
    () => purchasing.submit(order)
  );
}

// Resuming hours later on an earlier approval? Read it again first:
// a pause of the workspace or of this agent turns allowed to false.
const latest = await approvals.check(approvalId);
if (!latest.allowed) {
  const why = latest.paused ? "paused" : latest.status;
  throw new Error(`must not act: ${why}`);
}

An approval in VariantGate covers one request: one action with one summary and amount. It does not stretch to the next purchase. If a person pauses the workspace or that one agent in the meantime, allowed reads false on the next check, whatever was approved before. Approvals do not expire once given, so when the facts behind one may have changed, ask again rather than reuse it.

Stop the confused deputy at the action

The finance agent in OWASP’s example did nothing outside its rights. It paid because another agent asked. Two things break that chain:

  • The finance agent asks a person before paying, with its own key, and says where the instruction came from: which agent, which message. The person sees “requested by the mail-sorting agent, from an outside email” next to the bank details.
  • A rule makes payments above a small amount always ask, whichever agent started them. For the largest ones, two people have to approve.

Delegation should narrow rights, never widen them. If a worker agent needs to act, it gets its own key with its own scope, not the caller’s.

What this does not cover

Several ASI03 mitigations sit below the approval layer: wiping memory between tasks so cached secrets cannot be reused, binding OAuth tokens to a signed intent, and watching for agents that pick up new scopes through a chain of delegations. Identity platforms that treat agents as managed non-human identities handle much of that. An approval service adds the part they leave open: a person deciding the high-privilege step, and a record of which agent asked for it.

How ASI03 relates to the other nine risks is in the OWASP agentic Top 10 overview. Key scopes, expiry and rotation are described in Agent keys, and what an agent can never do is on Security.

Sources

  1. OWASP Top 10 for Agentic Applications for 2026, ASI03 Identity and Privilege Abuse