Start studying
Module 15 · AI Security Module contents
Module 15  ·  Card 13 / 16advanced

Denial of Wallet

Denial of wallet is an attack on your bill rather than on your uptime.

Because inference is metered, anyone who can send requests can spend your money.

Long inputs, forced long outputs and loops inside an agent all multiply the cost.

The service stays healthy throughout, so ordinary availability monitoring never fires.

Per-user rate limits, token caps, billing alerts and a hard spend ceiling are the controls.

Learn in depth ↓
Module 15 · AI Security · 16 concepts
In depth  /  15 lines

Denial of Wallet, in more detail

Denial of wallet is a denial of service attack aimed at your bill instead of your uptime.

It exists because inference is metered, so every request a stranger sends costs you real money.

Traditional denial of service tries to exhaust servers until the service stops responding.

Here the service keeps responding perfectly, and that is precisely what makes it hard to spot.

Availability monitoring stays green, latency looks normal, and no alert fires anywhere.

The first signal is very often the invoice at the end of the month.

Cost is driven by tokens, so an attacker maximises tokens rather than request count.

Very long inputs are the simplest lever, especially where retrieved documents are pasted into the prompt.

Prompts engineered to force long outputs multiply it further, since generated tokens usually cost more than input.

An agent is the worst case, because a single request can fan out into many model calls and tool calls.

Rate limit per authenticated user rather than per IP address, which an attacker rotates trivially.

Cap input and output tokens explicitly on every call instead of relying on provider defaults.

Bound agent loops with a maximum step count and a maximum spend for each task.

Set billing alerts and a hard ceiling at the provider, so the worst outcome is an outage rather than a debt.

Cache aggressively, because a repeated question answered from cache costs nothing at all.

Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Why does denial of wallet often go unnoticed for so long?
AI Security

16 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close