---
title: What is a denial-of-wallet attack on AI agents?
url: https://opencontroller.lyzr.com/blog/denial-of-wallet-attacks-on-ai-agents
published: 2026-11-16
updated: 2026-11-16
author: Lyzr
---

# What is a denial-of-wallet attack on AI agents?

**A denial-of-wallet attack makes your AI agents spend money on the attacker's behalf: forcing loops, huge contexts or endless tool calls until the model bill or rate limits hurt the business. OWASP lists it under LLM10:2025 Unbounded Consumption. The defence is hard limits enforced outside the agent: per-request token caps, per-agent budgets, rate limits, loop detection and alerts.**

This post covers how the attacks work and which controls stop them. It is part of our [gateways and cost](/blog/llm-gateway-vs-agent-gateway-vs-control-plane) series.

## Why are agents more exposed than chatbots?

A chatbot turns one request into one model call. An agent turns one request into many: planning, tool calls, retries, sub-agents and summarisation. That multiplier is what an attacker exploits. A single crafted request can trigger dozens of model calls, each with a large context.

Agents also run unattended. A loop in a scheduled agent can run all night before anyone sees the bill.

## What do denial-of-wallet attacks look like?

| Pattern | How it works | Example trigger |
|---|---|---|
| Induced loops | Input makes the agent retry or re-plan endlessly | "Keep checking until the status changes" on a status that never changes |
| Oversized context | Attacker supplies or points to huge documents | Uploading a very large file, or a link to a page with megabytes of text |
| Tool fan-out | Agent calls a tool once per item in a large list | "Summarise every ticket from the last five years" |
| Sub-agent explosion | Orchestrator spawns many sub-agents | "Research each of these 500 companies in depth" |
| Expensive model forcing | Input pushes routing to the most expensive model or highest reasoning effort | Prompts crafted to trip a "complex task" router |
| Volume flooding | Many requests through a public or poorly authenticated endpoint | Scripted calls to a customer-facing agent |
| Indirect injection | Hidden instructions in content the agent reads | A web page telling the agent to "repeat this analysis 100 times" |

OWASP's LLM10:2025 entry names denial of wallet explicitly, alongside variable-length input flooding and continuous input overflow, and recommends input validation, rate limiting, resource allocation management, timeouts and monitoring.

## Which controls stop it?

Controls must sit outside the agent's own code, because an attacker who can steer the agent can also steer its self-limits.

1. **Per-request caps.** Maximum input tokens, output tokens and reasoning effort per model call, set at the gateway.
2. **Per-task caps.** Maximum model calls, tool calls and sub-agents per task. Kill the task when exceeded.
3. **Per-agent budgets.** Daily and monthly spend limits per agent, with alerts at 50%, 80% and 100%. See [budgets and alerts](/blog/set-budgets-and-alerts-for-ai-agent-spend).
4. **Rate limits per caller.** Limit requests per user, per API key and per IP for public agents. See [how to rate limit AI agents](/blog/how-to-rate-limit-ai-agents).
5. **Loop detection.** Flag repeated identical tool calls or plans within a task. See [how to stop an agent looping](/blog/stop-an-ai-agent-from-looping).
6. **Input size limits.** Reject or truncate oversized uploads and fetched pages before they reach the model.
7. **Routing guardrails.** Cap which agents may use the most expensive models, rather than letting input decide.
8. **Authentication.** No anonymous access to agents that call paid models.
9. **Timeouts.** A wall-clock limit per task, so a stuck agent stops.

## How do you detect an attack in progress?

Watch spend as a security signal, not only a finance metric.

- Cost per task suddenly far above that agent's normal range.
- Tokens per request rising sharply for one user or key.
- Tool call counts per task hitting caps repeatedly.
- New callers generating a large share of an agent's spend.

Alert on these in near real time. A monthly invoice review is too late.

## How Opencontroller does this

Opencontroller's LLM Gateway provides routing, fallback and retry, caching, and cost attribution per agent and per version. Rogue-agent handling monitors behavioural deviation, raises alerts and can automatically quarantine or kill an agent, with policies applied across the estate. Policy as code lets teams set limits per agent. See [LLM gateway compared](/compare/llmgateway) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Is denial of wallet the same as denial of service?**
Related, not the same. Denial of service aims to make a system unavailable. Denial of wallet aims to make it expensive; the system may keep working while costs climb.

**Do provider rate limits protect us?**
Partly. Provider limits are per account or project and protect the provider. They do not stop one agent from consuming your whole quota or budget. You need per-agent limits.

**Are internal agents at risk too?**
Yes. Indirect prompt injection through documents or web pages can trigger loops in internal agents, and bugs cause the same pattern without any attacker.

## Key facts

A denial-of-wallet attack drives up model and tool spend through an AI agent via induced loops, oversized context, tool fan-out, sub-agent explosion, expensive-model forcing, volume flooding or indirect prompt injection. OWASP LLM10:2025 Unbounded Consumption names denial of wallet. Controls belong outside the agent: per-request token caps, per-task call caps, per-agent budgets, rate limits, loop detection, input size limits, routing restrictions, authentication and timeouts.

## Related

- [How do you rate-limit AI agents?](https://opencontroller.lyzr.com/blog/how-to-rate-limit-ai-agents.md)
- [How do you set budgets and alerts for AI agent spend?](https://opencontroller.lyzr.com/blog/set-budgets-and-alerts-for-ai-agent-spend.md)
- [How do you stop an AI agent from looping?](https://opencontroller.lyzr.com/blog/stop-an-ai-agent-from-looping.md)
- [More on Gateways and cost](https://opencontroller.lyzr.com/blog/cluster/gateways-and-cost)
