Denial of wallet: how attackers run up your AI bill overnight

One scripted free account can cost $720 a night on Claude Sonnet 5.5. How denial of wallet works, why provider limits miss it, and how to stop it.

Brandon Holt
November 27, 2026
8
min read
Summarize
Denial of wallet: how attackers run up your AI bill overnight

Denial of wallet is an attack that drives up what your AI product spends on model calls until the bill does the damage an outage would. Attackers use scripted free accounts, leaked API keys or prompts that trap your agent in a loop. At Claude Sonnet 5.5 prices, one scripted free account can cost you $720 in a night.

Prices checked on November 27, 2026, from Anthropic's pricing page.

Security teams also call it economic denial of service, and OWASP files it under unbounded consumption. The fix lives inside your own app, because only your app knows which customer sent each call. Our guide to cutting LLM costs covers the everyday side of the same bill.

What denial of wallet means in OWASP's LLM10:2025 Unbounded Consumption

The OWASP Top 10 for LLM applications lists the risk as LLM10:2025 Unbounded Consumption. OWASP describes it as an application that lets users run excessive, uncontrolled inference, which can lead to denial of service, economic losses, model theft and degraded service.

OWASP names Denial of Wallet (DoW) as one of seven common examples. The other six are variable-length input floods, continuous input overflow past the context window, resource-intensive queries, model extraction through the API, functional model replication and side-channel attacks. Its mitigations include rate limiting, resource allocation management, timeouts and throttling, and logging with anomaly detection.

For a product that pays per token, the wallet version is the one that hurts first. Your servers can stay healthy the whole time while every request an attacker sends adds to your provider invoice.

How denial of wallet happens to AI products

Scripted free accounts. Someone writes a script that signs up accounts with throwaway emails and uses your free tier as a free model proxy. Each account stays under your per-account rate limit, and the total across 50 accounts goes unnoticed until the invoice arrives.

Agent loops. An agent calls a tool, gets an error, and retries with the full conversation history attached. Each turn resends a longer context, so each call costs more than the last. A bug or a crafted prompt can start the loop, and nobody has to attack you on purpose.

Long-context abuse. Claude Sonnet 5.5 includes a 1 million token context window at standard pricing, so a 900,000-token prompt costs you $1.80 in input on a single call. Claude Haiku 5.5 charges five times its base input rate once a prompt passes 100,000 tokens. Paying customers can do this too, and flat plans attract exactly that heavy usage, as Cursor's pricing and power users shows.

Stolen or leaked API keys. In May 2024, Sysdig's threat research team described attackers who took cloud credentials from a system running a vulnerable version of Laravel, tested them against 10 AI services, and appeared to plan reselling the access. Sysdig estimated the worst case at over $46,000 a day on Claude 2.x. A September 2024 follow-up put it at over $100,000 a day on Claude 3 Opus and recorded 61,000 Bedrock requests in a three-hour window on July 11, 2024.

Retry storms. A client that retries every failure without backoff multiplies its own traffic. OpenAI's rate limit guide warns that unsuccessful requests count toward your per-minute limit, and it recommends exponential backoff with jitter and a cap on attempts. Retries of successful calls cost real money: if your code re-asks the model each time it returns malformed JSON, you pay for every attempt.

What a denial of wallet attack costs in one night

Example. A SaaS product sells a $49 plan, offers a free tier, and runs its AI features on Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens. The table prices four scenarios over an 8-hour night.

ScenarioCallsTokens per call (in / out)Cost per callCost per night
One scripted free account, 30 calls a minute14,40020,000 / 1,000$0.05$720
Ten scripted free accounts144,00020,000 / 1,000$0.05$7,200
One looping agent, a call every 5 seconds5,76080,000 / 500$0.165$950.40
Leaked key at the Scale tier's Sonnet 5.5 token limitsAny10M / 2M per minute$40 per minute$19,200

Example data. Scripted account: 20,000 × $2 ÷ 1M + 1,000 × $10 ÷ 1M = $0.05 per call. Looping agent: 80,000 × $2 ÷ 1M + 500 × $10 ÷ 1M = $0.165 per call. Leaked key: Anthropic's Scale tier allows 10M input and 2M output tokens a minute on Sonnet 5.5, or $40 a minute for 480 minutes.

One scripted free account costs you as much in a night as a paying customer brings in over 14 months. Neither that account nor the agent loop sends calls fast enough to trip a per-minute alarm. Both look like busy, ordinary users until you add up their dollars for the day.

Prompt caching on the agent's repeated history would cut the loop's input cost sharply, since Sonnet 5.5 cache hits cost $0.10 per million tokens. The loop would still run until something stopped it. Claude API cost per token has the full price math.

Why provider rate limits don't protect you from denial of wallet

Provider limits cover your whole account. Anthropic sets its rate limits and spend caps at the organization level, and OpenAI defines its limits at the organization and project level, "not user level." Neither provider knows which of your customers sent a call, so an abuser and your best customer draw from the same pool.

The limits also exist to protect the provider. Anthropic says it designed its limits to prevent API abuse and share capacity fairly across its users. The monthly spend caps are $500 on the Start tier, $1,000 on Build and $200,000 on Scale. When your organization hits its cap, Anthropic pauses API usage until the first day of the next month and returns HTTP 429 to every request.

That turns a denial of wallet into a denial of service for every paying customer you have. One farmed free tier can burn the month's cap and take your product down for weeks. Anthropic's workspace limits let you split the cap between products or environments, but a workspace still serves many customers, so it can't stop one of them.

How to defend against denial of wallet: a checklist

  1. Set per-customer limits in calls and dollars inside your app. Count calls per minute and dollars per hour for each customer ID before the request reaches the provider. A dollar limit catches the slow, expensive caller that a call limit misses.
  2. Give free users a daily budget. A $0.50 daily cap per free account stops the scripted account in the example after 10 calls instead of 14,400.
  3. Add friction at sign-up. Verify email, block disposable domains, cap accounts per device or IP, and ask for a card before a trial gets full model access.
  4. Cap the size of each request. Set max_tokens, a maximum prompt size per plan, a step limit per agent task, and a retry limit with backoff and jitter.
  5. Watch cost per customer for anomalies. Compare each customer's spend with their own last seven days and with the typical customer on their plan. Alert when a new account spends like your heaviest paying customer in its first hour.
  6. Keep your keys clean. Keep provider keys on your servers and out of browser and mobile bundles. Use one key per environment and service, set a workspace spend limit below your organization cap, scan your repositories for secrets, and rotate a key the day you suspect a leak.
  7. Decide fail-open or fail-closed on purpose. Every limiter needs a rule for the moment it can't reach its own data.

Fail open and paying customers keep working, with abuse unchecked for the length of the outage. Fail closed and you protect the bill by taking the product down. A sensible split is to fail closed for free and anonymous traffic and fail open for paying customers, with a hard dollar cap your app can check locally.

Lancelot's SDK has an emergency stop that runs inside your app: it stops a customer who passes 600 calls a minute or $50 in 5 minutes, holds them for a 5-minute cooldown, and fails open if the SDK can't reach Lancelot. Hourly checks also flag runaway loops and free-tier farming (Runtime protection).

Questions about denial of wallet

What is a denial of wallet attack?

A denial of wallet attack drives up the usage-based bill of an AI or cloud product until the cost causes the damage. Attackers send many or very large requests through free accounts, stolen keys or looping agents, and the product owner pays the provider for every token.

What is OWASP LLM10?

LLM10:2025 is Unbounded Consumption, the tenth entry in OWASP's 2025 Top 10 for LLM applications. It covers apps that let users run excessive, uncontrolled inference, and it lists Denial of Wallet as one of seven common examples, alongside input floods and model extraction.

Is denial of wallet the same as denial of service?

Denial of wallet targets your bill, and denial of service targets your availability. They often end up in the same place: when your provider spend cap runs out, Anthropic pauses API usage until the next month, and every customer loses access.

Do OpenAI and Anthropic rate limits stop denial of wallet?

No. Both providers apply limits to your whole organization or project, so they can't tell one abusive customer from your best one. Their spend caps stop the bill by cutting off all your traffic, which turns the attack into an outage.

How much can a denial of wallet attack cost?

One scripted free account sending 30 calls a minute costs about $720 in an 8-hour night on Claude Sonnet 5.5, at 20,000 input and 1,000 output tokens per call. Sysdig estimated stolen-key attacks at over $100,000 a day on Claude 3 Opus in 2024.

How do I protect my LLM app from unbounded consumption?

Enforce per-customer limits in calls and dollars inside your app, give free users a daily budget, and add sign-up friction. Cap prompt size, output tokens, agent steps and retries, watch cost per customer for anomalies, and keep provider keys on your servers.

Should a cost limiter fail open or fail closed?

Decide per tier. Failing open keeps paying customers working during an outage but leaves abuse unchecked, and failing closed protects the bill by blocking everyone. A sensible split is to fail closed for free traffic and fail open for paying customers with a local dollar cap.

Abuse is the expensive edge of a bill that grows every day from ordinary use. For the ordinary part, read our guide to cutting LLM costs.

Keep reading

All dispatches →
Denial of wallet: how attackers run up your AI bill overnight
Running AI in production
/
8
min read

Denial of wallet: how attackers run up your AI bill overnight

Are AI companies profitable? What the reported margins show
AI unit economics
/
9
min read

Are AI companies profitable? What the reported margins show

Customer profitability analysis for AI products, step by step
AI unit economics
/
8
min read

Customer profitability analysis for AI products, step by step

SaaS COGS for AI products: what belongs and how to split it
AI unit economics
/
9
min read

SaaS COGS for AI products: what belongs and how to split it

Get the numbers when they change.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
New dispatches and model price changes. Unsubscribe anytime.