Safety & security

Denial of Wallet

AI-assisted editorial review:

A term used in AI security and operations for an attack or incident that floods a pay-per-use AI service with excessive requests, saddling the victim with costs that are hard to bear instead of taking the service down.

What does Denial of Wallet mean in simple terms?

AI APIs usually charge according to the number of tokens processed. So if someone sends a huge number of requests to a company's chatbot or automation, or a badly built automation repeats the same task endlessly, the bill rises sharply even while the service keeps working. OWASP treats this as one type of the LLM10 "Unbounded Consumption" risk and explains that attackers exploit usage-based pricing. The basic countermeasures are per-user request limits, input length limits, execution time limits, and the monthly spending limits that AI providers offer. For smaller organizations especially, a single API key without a set limit can lead to a large unexpected bill.

How can Denial of Wallet be explained with an analogy?

It is like someone secretly leaving the tap running in a home where the water bill depends on how much you use.

Where is Denial of Wallet used?

Case 1

Sourcegraph — API usage surges through a leaked admin token

On August 30, 2023, Sourcegraph disclosed that someone had found an admin access token that an employee accidentally committed to code on July 14, and had changed their own account into an admin account.[2] This user built a proxy app that let other people use Sourcegraph's API and the large language models behind it, and the app was viewed about 2 million times.[2] After seeing a sharp increase in API usage, the company blocked the account the same day.[2]
Result: Temporarily lowered the request limits for all free users (per Sourcegraph's disclosure).[2]

Case 2

AI providers — Monthly spending limit features

Anthropic sets a monthly spending limit for each usage tier; when the limit is reached, API use stops until 00:00 (UTC) on the 1st of the following month, and organizations or workspaces can also set lower limits themselves.[3] OpenAI also allows monthly limits at the project and organization level, but notes that they are not applied instantly, so actual spending may slightly exceed the set amount.[4]
Result: When an Anthropic tier limit or an OpenAI hard limit is reached, requests are rejected with an error (429), which can stop costs from rising (per each company's official documentation).[3][4]

Learning steps, limitations and developments

  1. In your AI provider's console, set monthly spending limits per organization and project (workspace), and set alert amounts too if supported.
  2. Put per-user, per-hour request limits on chatbots that are open to the public.
  3. Where an automation may run repeatedly, add a maximum number of runs or a time limit.
  4. Check the usage graph once a week, and replace the key immediately if you see an unusual spike.

The OWASP document does not give figures for the scale of cost damage, and the damage varies widely depending on the service's structure and pricing plan.[1] Because a spending limit can also suddenly stop a running service, it is best to set limit amounts and alert thresholds separately according to how critical each task is.[4]

How has Denial of Wallet evolved?

2023.08
API usage abuse case
An incident in which an LLM API was used at scale through a leaked admin token is disclosed.
2024.11
Denial of Wallet
OWASP LLM10 goes beyond denial of service to cover unexpected cost risks as well.

Which concepts are related to Denial of Wallet?

  • Countermeasure
    Rate LimitLimits the number of requests within a set time
  • Cost structure
    Token CostA pricing method that charges for the tokens used
  • Underlying technology
    APIThe connection used to call AI features
  • Cost saving
    Prompt cachingReuses repeated input to reduce costs

Denial of Service vs Denial of Wallet

ComparisonDenial of service (DoS)Denial of wallet
GoalTaking the service downRunning up costs that cannot be absorbed
What the damage looks likeService unavailable, slow responsesBills surge while the service works normally
When it is noticedAs soon as an outage occursWhen checking bills or usage
Main countermeasuresBlocking or distributing trafficRequest limits, spending limits, alerts

Which sources explain Denial of Wallet?

  1. OWASP GenAI Security Project — LLM10:2025 Unbounded Consumption (accessed 2025) — https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/
  2. Sourcegraph — Security update (2023-08-30) — https://sourcegraph.com/blog/security-update-august-2023
  3. Anthropic — Rate limits (accessed 2026) — https://platform.claude.com/docs/api/rate-limits
  4. OpenAI — Spend limits (accessed 2026) — https://developers.openai.com/api/docs/guides/spend-limits