Inference is expensive: unbounded prompts, outputs, tool loops or batch jobs let attackers exhaust capacity, run up bills or copy a model through mass querying.
- Limit input size, output tokens, tool-call depth and time for each request.
- Apply per-user and per-tenant quotas and spending budgets, with alerts.
- Rate-limit and monitor query patterns that suggest model extraction.
Guides on this site
Bound agent spending, memory and recovery
Enforce budgets and stop conditions outside the model, and make retained context and side effects recoverable.
Call a hosted LLM API safely
A code-first checklist for wiring up an OpenAI or Anthropic API call from a backend: keep keys server-side, redact PII before prompts and logs, choose provider retention settings deliberately, validate structured output and still treat it as untrusted, and set timeouts, retries and per-user cost caps.
References
- LLM10:2025 Unbounded Consumption (OWASP, 2025 edition)
- OWASP Top 10 for LLM Applications 2026 (OWASP GenAI Security Project resource page)
List data from the publisher. A guide is listed as the main subject when the weakness or risk is what the guide is about, and as covering it when a dedicated section or worked example addresses it.