AI denial of wallet attacks can drain six figures from your cloud account before your oncall engineer wakes up. One documented incident in early 2026 produced $82,314 in Google Cloud API charges in under 48 hours from a single compromised legacy key. This guide explains exactly how denial of wallet attacks work, how they differ from LLMjacking, and what controls stop them.
Key Takeaways
- AI denial of wallet (DoW) attacks exploit per-token pricing to exhaust budgets rather than disrupt service availability
- Attack vectors include adversarial token flooding, agent tool-call chain amplification, guardrail-as-DoS exploitation, and exposed MCP endpoints
- Documented 2026 incidents show costs reaching $100,000 per day or more, with a single stolen API key generating $82,000 in 48 hours
- Detection requires cost anomaly monitoring at the API gateway layer, not just request-count rate limiting
- Defense requires independent controls at every layer: session token budgets, circuit breakers, output length caps, and real-time alerting
- OWASP classifies this attack class under LLM10:2025 Unbounded Consumption, with published guidance on mitigations
- Exposed MCP endpoints introduce a new attack surface where compromised tool servers trigger recursive cost amplification in agentic systems
What Is an AI Denial of Wallet Attack?
Traditional denial of service attacks make a system unavailable. Denial of wallet attacks make a system too expensive to operate. The attacker's goal is not downtime but financial disruption: exhaust the victim's AI budget, trigger cloud spending alerts, force emergency shutdowns, or simply impose costs that exceed the business value of the AI deployment.
OWASP formally classifies this threat under LLM10:2025 Unbounded Consumption, which covers any scenario where an LLM application processes requests in ways that cause disproportionate resource consumption or cost. The attack class spans several distinct techniques, from simple token flooding to sophisticated agentic exploitation.
The economics make this attack unusually asymmetric. A stolen OpenAI API key sells for as little as $30 on criminal marketplaces. The victim's resulting bill can exceed $46,000 per day for Claude 2.x attacks on AWS Bedrock and over $100,000 per day for frontier model attacks. That cost-to-attack ratio is worse than almost any other category of infrastructure exploitation.
The key distinction from related threats:
LLMjacking is credential theft for monetization. Attackers compromise AI API keys and either use the inference capacity themselves or resell access on underground markets. The attacker benefits from your compute. LLMjacking is theft.
Denial of wallet is deliberate cost amplification as a weapon. The attacker's goal is to make the AI deployment so expensive that the victim shuts it down. No resale occurs. Denial of wallet is sabotage.
In practice, the line blurs. Many LLMjacking operations shift toward denial-of-wallet behavior when they want to punish a specific target or cover their tracks by flooding logs. Understanding both is necessary for complete defense.
The Denial of Wallet Attack Taxonomy
Token Flooding
The simplest form. Every request sets max_tokens to the model's ceiling (often 32,000 or more) and sends a maximum-length prompt. One request with a 10,000-token prompt and 32,000 token output cap costs roughly 200 times more than a standard 50-token query at the same request count.
Request-count rate limiting does not stop this attack. A rate limiter set at 100 requests per minute passes 3.2 million output tokens per minute if each request exploits the output ceiling. Token-aware rate limiting at the gateway layer is the only effective control.
Agent Tool-Call Chain Amplification
Agentic systems introduce quadratic cost growth by default. Most stateless LLM APIs require the full conversation history to be resent with each step. In a ReAct-style planner-executor loop, each tool call adds to the context resent on the next step. A 20-step agent workflow with a 1,000-token base context produces approximately 210,000 tokens of API traffic, not 20,000.
Attackers exploit this by poisoning tool responses or triggering unexpected environment states that cause agents to enter recursive retry loops. Research published in January 2026 on stealthy resource amplification via tool-calling chains demonstrated that a single maliciously crafted tool response can spiral an agentic system into hundreds of LLM calls per user session.
The practical consequence: a developer who deploys an AI agent with no per-session token ceiling can generate thousands of dollars in charges from a single adversarial user interaction, without any API credential theft.
Guardrail-as-DoS Exploitation
Guardrails create an attack surface that most organizations do not consider. A synchronous four-check pipeline adds a minimum of 400ms to every request. Under adversarial load, this becomes a force multiplier. Attackers send high volumes of requests specifically crafted to trigger the most expensive guardrail validation chains, consuming compute twice: once for the LLM call and once for every validator in the chain.
A four-layer synchronous guardrail stack with PII detection, topic classification, toxicity screening, and output validation can add 0.5 to 3 seconds per request to your processing cost. At scale, this is not a latency problem. It is a cost multiplication problem. Async parallel guardrail execution reduces the attack surface significantly by eliminating serial compounding.
Exposed MCP Endpoint Exploitation
Model Context Protocol servers introduce a new denial of wallet vector. A compromised or malicious MCP server can return responses designed to trigger recursive tool calls, extend agent context windows on every step, or initiate long-running tasks that compound API costs over hours.
The Sysdig Threat Research Team documented that by late 2025, a significant portion of LLMjacking attack traffic had shifted toward MCP reconnaissance, looking for exposed inference infrastructure that could be used as cost amplification infrastructure rather than just compute theft.
With over 200,000 MCP servers exposed across internet-accessible endpoints (per OX Security research, April 2026), and 53% using static API keys with no OAuth, the MCP layer represents the most rapidly growing denial of wallet attack surface.
Real 2026 Incidents: What Attackers Actually Did
The $82,314 Google Cloud Key Incident (February 2026): An organization's Google Cloud API key, originally scoped for Maps and Firebase, silently gained access to Gemini API when Google enabled the Generative Language API on the project. A compromised legacy key generated $82,314 in charges in under 48 hours. Approximately 3,000 GCP API keys were estimated to be affected by this silent scope expansion behavior.
Operation Bizarre Bazaar (December 2025 to January 2026): A criminal campaign captured over 35,000 attack sessions targeting AI API credentials across major cloud providers. Bills generated by this operation exceeded $100,000 per day at peak. Pillar Security research documented the campaign's shift from credential resale to deliberate budget exhaustion as a service disruption tactic.
The Agent Retry Loop (Ongoing Pattern): Sysdig documented multiple incidents where AI agents entered infinite retry loops on unexpected API responses or environment state. One specific case produced $4,200 in API charges over six hours while the responsible developer slept. No credential theft occurred. The trigger was an unanticipated tool response that the agent's error handling routed into a retry queue with no circuit breaker or call ceiling.
The OpenAI Bill Shock Pattern: Multiple organizations reported receiving monthly invoices of $67,000 or more after previously paying $400 per month, following exposure of API keys through developer tool integrations, environment variable leakage, or third-party plugin compromise (such as the JetBrains Marketplace incident involving 15 malicious plugins with 70,000 combined installations).
Detection: Finding Attacks Before the Invoice Arrives
Cost Anomaly Monitoring
The highest-signal detection method is real-time token consumption monitoring, not request counting. Configure alerts at two thresholds:
- 2x baseline token consumption: Soft alert requiring human review
- 10x baseline: Hard block with automatic key rotation or service suspension
For AWS Bedrock deployments, monitor CloudTrail for DeleteModelInvocationLoggingConfiguration events. This is a near-certain indicator of an active attacker attempting to cover traces.
Per-Session Token Budgets
Enforce independent limits on input tokens, output tokens, and total tokens per session, not just per API key. Azure API Management provides an llm-token-limit policy for this purpose. Kong AI Rate Limiting Advanced and Apache APISIX's ai-rate-limiting plugin provide vendor-neutral alternatives. Portkey supports per-virtual-key token budgets with automatic enforcement and overage blocking.
The critical architectural point: token budgets must be enforced at the gateway layer, not inside the application. Application-level controls can be bypassed by direct API calls. Gateway enforcement cannot.
Behavioral Signals
Beyond cost metrics, specific behavioral patterns indicate active denial of wallet attacks:
- Prompt length distribution shifting toward maximum-length inputs across multiple sessions
max_tokens_to_sample: -1parameter values in API request logs- Geographic anomalies: unusual originating regions or simultaneous multi-region API access
- Error rate spikes in 429 rate limit and 403 permission denied responses from upstream providers
- Tool call counts per session exceeding 3 to 5 times the application's expected maximum
Defense-in-Depth: Layer-by-Layer Controls
API Gateway Layer
- Token-aware rate limiting: Enforce per API key, per user session, and per time window. Request-count limits alone are insufficient.
- Hard max_tokens cap: Set an absolute ceiling at the gateway regardless of what the application requests. If your use case never requires more than 4,000 output tokens, cap all requests at 4,096 and reject anything above.
- Streaming timeout: Disconnect streaming responses that exceed your maximum expected completion time. A 60-second hard cut prevents indefinite token generation.
- Input length validation: Reject prompts exceeding a defined character or token limit before they reach the model.
Agent and Orchestration Layer
- Per-session call limits: Configure a maximum number of LLM calls per agent session. If your agent should never need more than 20 steps, terminate at 25.
- Circuit breakers on tool calls: Automatic halt when consecutive tool call failures exceed a threshold. Retry queues with no circuit breakers are a direct path to runaway cost.
- Context window pruning: Implement rolling context windows rather than appending full conversation history indefinitely. Stateless API calls with unbounded context are the primary driver of quadratic cost growth.
- Session budget enforcement: Track cumulative token spend per session at the orchestration layer. Terminate sessions that exceed the defined ceiling regardless of task completion status.
Kill Switch Architecture
Build three independent termination layers with different response times:
Relying on a single layer means a bypass at that layer produces an unconstrained attack. All three layers must operate independently.
MCP Endpoint Hardening
Treat MCP servers as a privileged attack surface requiring the same controls as any external API:
- Deploy MCP servers inside your network perimeter, not on internet-accessible endpoints
- Require OAuth 2.0 with short-lived tokens; eliminate static API key authentication
- Implement tool-call allowlists: restrict which tools an agent can invoke and how frequently
- Log all MCP tool calls with full request and response content for forensic analysis
- Review and vet every MCP server you connect to, including npm packages and community-distributed tools
Governance: AI Cost Monitoring as a Security Control
Most organizations treat AI spending as a finance or engineering problem. Security teams should treat per-session token consumption as a security telemetry signal.
Budget controls are security controls. A hard daily spend limit on an AI API key is a circuit breaker against both credential compromise and agent runaway. Configure it in your API gateway, not just your cloud billing console.
AI cost data belongs in your SIEM. Token consumption spikes are security events. Route API gateway cost telemetry to your SIEM alongside authentication logs, network flow data, and application logs. Correlate cost anomalies with authentication events to identify compromised credentials before the invoice arrives.
Separate cost visibility by team and application. A single shared API key for your entire organization makes anomaly detection nearly impossible. Use per-team, per-application API keys with individual token budgets. An anomaly in one key is immediately visible against the baseline for that specific use case.
Third-party AI integrations require API key scoping review. The JetBrains Marketplace incident and the silent GCP API scope expansion both involved keys granted more access than the application required. Audit API key permissions quarterly and revoke credentials for integrations that have not been actively used in 30 days.
For organizations running AI red team assessments, denial of wallet scenarios should be an explicit scope item. Testing whether your cost controls hold under adversarial conditions is materially different from testing whether the application produces correct outputs.
Conclusion
AI denial of wallet attacks are not a theoretical risk. They are active, documented, and producing six-figure losses in hours. The attack surface spans four distinct vectors: token flooding, agent tool-call chain amplification, guardrail-as-DoS exploitation, and exposed MCP endpoints. Defense requires independent controls at every layer, cost anomaly monitoring as a security telemetry feed, and explicit governance policy treating AI spending limits as security controls.
The economic asymmetry of these attacks makes them attractive. A $30 credential purchase on a criminal marketplace can produce a $100,000 daily bill for the victim. Organizations that have deployed AI features without token budget enforcement, gateway-layer rate limiting, and per-session circuit breakers are exposed right now.
Run a Securetom scan to identify exposed AI API endpoints, unprotected MCP servers, and misconfigured inference infrastructure in your environment. Or book an AI security assessment to evaluate your full denial of wallet attack surface, including agent orchestration controls and guardrail architecture.
Additional resources:
AI Security Audit Checklist
A 30-point checklist covering LLM vulnerabilities, model supply chain risks, data pipeline security, and compliance gaps. Used by our team during actual client engagements.
We will send it to your inbox. No spam.
BeyondScale Team
AI Security Team, BeyondScale Technologies
Security researcher and engineer at BeyondScale Technologies, an ISO 27001 certified AI cybersecurity firm.
Want to know your AI security posture? Run a free Securetom scan in 60 seconds.
Start Free Scan

