Part 6 · LLM Application Security
LLM06: Unbounded Consumption
Without limits on inference, attackers can exhaust budgets, degrade service, or copy a model's behavior.
What it is
Unbounded consumption occurs when an LLM application allows excessive and uncontrolled inference. The defining feature is cost asymmetry: a cheap request can trigger disproportionately expensive computation.
How the attack unfolds
Alerts report a problem after it happens. Hard limits stop spending while it is happening.
Forms of abuse
- Denial of wallet: usage is driven up until the budget is gone.
- Denial of service: expensive requests starve legitimate users.
- Agent loops: an agent keeps calling tools or models without stopping.
- Reasoning amplification: short prompts trigger long, costly reasoning.
- Model extraction: systematic querying is used to copy a model's behavior.
- Stolen credentials: attackers run inference on a victim's account, often called LLMjacking.
Defenses
- Limit tokens as well as requests. Set quotas per user, per key, and per day.
- Set hard spending caps. Halt inference at a budget ceiling.
- Validate input size. Estimate tokens before inference.
- Bound agent workflows. Limit steps, tool calls, and total cost per task.
- Monitor usage. Attribute consumption to users, agents, and workloads.
- Protect credentials. Rotate keys and alert on unusual use.
Common misconception
Common belief
"Budget alerts protect us from runaway costs."
In practice
An alert only tells you what is happening. Automated abuse can outrun a person, so a cap must stop the spending.
Key takeaways
- Attackers can exploit the high cost of inference.
- Limit tokens, cost, and agent steps as well as requests.
- Hard caps stop spending, while alerts only report it.