OWASP ASI02 Tool Misuse and Exploitation: a policy for every tool
The agent stays inside its permissions and still does harm. Per-tool profiles, a check outside the model before each call, budgets, and approvals that show what will change.
· 8 min read
ASI02 Tool Misuse and Exploitation is the second risk in OWASP’s Top 10 for Agentic Applications. It covers the case where the agent “operates within its authorized privileges but applies a legitimate tool in an unsafe or unintended way”: it deletes valuable data, calls a paid API in a loop, or sends information where it should not go. Nothing was hacked. The tool did what tools do.
The boundary with its neighbours is drawn carefully. If the agent gains rights it should not have, that is ASI03. If the misuse ends in running injected code, it is ASI05. If the tool was malicious from the start, it is ASI04, the supply chain.
What it looks like
OWASP’s examples are ordinary, which is the point:
- An email summariser that can also delete or send mail without confirmation.
- A customer service bot meant to read order history that also issues refunds, because its tool had full access to the payments API.
- A planner that calls an expensive API over and over, until the bill or the outage arrives.
- A coding agent whose harmless tools, such as ping, may run without asking. An attacker makes it ping again and again and carries data out in the DNS lookups.
OWASP notes that ASI02 builds on the mitigations of Excessive Agency (LLM06:2025, now LLM03:2026) and extends them to agents that plan several steps and hand work to each other. The eight mitigations it lists fall into four practical jobs.
1. Write a profile for every tool
The first mitigation is “Least Agency and Least Privilege for Tools”: a profile per tool with its scope, its maximum rate and where it may send data, written as a policy rather than left to convention. For a support agent it might read like this:
- orders.read
- Read-only database login, own customer's orders only. Runs without asking.
- refund.create
- Payments API key limited to refunds. Up to €50 runs, €300 a day in total; above that a person decides.
- email.send_bulk
- Only to the customer list. A person approves every send.
- account.delete
- Not given to this agent at all, and refused if it ever asks.
The first column is the credential, which is your job. The second is who decides when the tool acts, and that part can be written as rules that a service enforces outside the model:
# Refunds up to €50 run on their own, €300 a day in total.
{ "action": "refund.create", "effect": "allow",
"limit_amount": "50.00", "limit_currency": "EUR",
"budget_amount": "300.00", "budget_currency": "EUR", "budget_period": "day" }
# Anything above €50, or without an amount, waits for a person.
{ "action": "refund.create", "effect": "ask",
"limit_amount": "50.00", "limit_currency": "EUR" }
# Mail to many people always asks; deleting an account never happens.
{ "action": "email.send_bulk", "effect": "ask" }
{ "action": "account.delete", "effect": "deny" }Leaving the amount out does not get a refund past the limit: an allow rule only applies to an amount it can compare, and the ask rule catches the rest. To sort a long tool list into these groups, paste it into the tool risk checker.
2. Check outside the model, before the call
OWASP calls the fourth mitigation an “Intent Gate”: treat the planner’s output as untrusted and let a separate enforcement point validate the intent and the arguments, enforce schemas and rate limits, before anything runs. Two details decide whether it holds:
- It sits in the code that acts. The refund function asks, waits, and runs only on
allowed: true. Pending, denied, expired and an unreachable service all mean no refund. - It is asked with the real arguments. The amount, the recipient and the count come from the call your code is about to make, not from what the model says it is doing.
3. Show what will change, then do exactly that
The second mitigation asks for confirmation of “high-impact or destructive actions (delete, transfer, publish)” and, where possible, “a dry-run or diff preview” before the approval. A person who sees “update contacts” approves a sentence. A person who sees “2,140 contacts, field: owner” can tell that the filter matched far more than intended.
// Work out what would change first. Nothing is written yet.
const plan = await crm.previewBulkUpdate(filter, changes);
await approvals.guard(
{
action: "crm.update_bulk",
summary: `Change ${plan.count} contacts: set ${describe(changes)}`,
details: {
contacts: plan.count,
fields: Object.keys(changes).join(", "),
examples: plan.sample
.slice(0, 3)
.map((row) => `${row.id}: ${row.before} → ${row.after}`)
.join("; "),
},
},
// Apply the plan that was shown, not a fresh query that may match more.
() => crm.applyPlan(plan.id)
);The last line matters as much as the preview. If the approved action re-runs the query, it can touch rows that were never shown. Apply the plan that was approved. If the person lowers an amount or rewords the summary while approving, the SDK’s guard does not run the action at all unless you opt in to the narrower version and use its values.
4. Put limits on what is allowed
The ping example is the uncomfortable one: the tools that may run without asking are the ones an attacker reaches for. OWASP’s answer is “Adaptive Tool Budgeting”, ceilings on cost, rate or tokens with throttling or revocation when they are passed.
- Money: a budget on an allow rule caps what it may approve per day, week or month. After that, requests go to a person until the period starts again.
- Volume: budgets count money, not calls. For a tool with no amount, count calls in the tool itself, or make it ask. Each agent key also has a rate limit on asking, but only calls that go through the gate meet it.
- Egress: an allowlist of destinations belongs in the network or the sandbox (mitigation 3). No approval step replaces it.
Log every call, not only the approved ones
The eighth mitigation asks for immutable logs of every tool call and its parameters, and for alerts on odd sequences such as a database read followed by an outside transfer. Requests that go through VariantGate land in a sealed record with who asked, who decided and what happened. Tool calls that never ask do not, so log those yourself.
A short test for each tool: does it need to exist, what can its credentials do, and who decides when it acts? If the third answer is “the model”, that tool is your ASI02 exposure.
The full list, and which risks an approval step helps with, is in the OWASP agentic Top 10 overview. Writing the answers down for your own agent takes a few minutes with the approval policy generator.