
Overview
Denial-of-service attacks are a classic threat to servers and web infrastructure — but as AI models are deployed across APIs, apps, and agents, they too have become targets of disruption.
Model Denial of Service (MoDoS) refers to attacks that deliberately overwhelm or degrade AI model performance by feeding it adversarial, malformed, or computationally expensive inputs. These attacks aim to exhaust processing power, generate large bills, or cause models to fail under load — creating new risks in the era of AI-driven systems.
What Is a MoDoS Attack?
A MoDoS attack seeks to crash, hang, or overload an AI model through the strategic use of hostile inputs. This can include:
- Extremely long or nested prompts
- Prompts designed to trigger maximal token output
- Inputs crafted to increase model perplexity or computation cost
- Infinite or recursive loop triggers in multi-agent systems
- Malformed images or audio that break model preprocessing pipelines
Unlike traditional DoS, MoDoS doesn’t target the infrastructure — it attacks the model itself.
Example Scenarios
- A spammer floods a public LLM API with massive prompts like “Summarize this 100-page document” hundreds of times per minute.
- An attacker triggers infinite responses in an AI assistant by recursively prompting it to repeat or reflect.
- A malicious image input contains visual patterns that cause a vision model to stall or crash during inference.
- Attackers force auto-reply agents into an infinite email thread loop by chaining ambiguous messages.
Why It’s Dangerous
- Exploits Model Weaknesses, Not Systems: Traditional security tools may miss MoDoS because the model is the target.
- Financial Drain: Pay-per-token models like LLMs can rack up huge costs under abuse.
- Operational Disruption: AI outages can cause cascading failures in applications and user experiences.
- Hard to Rate-Limit: Legitimate-looking prompts can still cause massive slowdowns if crafted maliciously.
Common Signs of MoDoS Activity
| Indicator | Description |
|---|---|
| Spike in compute usage per request | Unusual increase in GPU/CPU time per model execution |
| Excessive prompt length | Repeated long or deeply nested prompts hitting APIs |
| Unexpected crash logs or timeouts | Model inference calls start timing out or throwing exceptions |
| Prompt recursion or loops | Agents caught in multi-turn feedback or echo patterns |
| Surge in token usage | Daily or hourly spike in token generation from a subset of users |
Defensive Recommendations
| Area | Recommended Action |
|---|---|
| Prompt Length Limits | Enforce hard caps on input and output token counts |
| Request Cost Monitoring | Track and alert on high-cost model executions by IP or user |
| Loop & Pattern Detection | Implement guards against recursive prompt chains |
| Compute Time Budgeting | Set execution time limits per request to avoid infinite inference |
| Anomalous Usage Alerts | Automatically flag abnormal usage spikes from known endpoints |
Best Practices
- Apply Token Budgeting
Limit max tokens per request, per minute, and per user/session for both input and output. - Use Pre-Prompt Scanning
Check incoming prompts for known abuse patterns like recursion, nesting, or long payloads. - Employ AI-Aware Rate Limiting
Don’t just throttle by request count — throttle by expected compute cost. - Introduce “Safe Mode” Triggers
If a user exceeds a compute threshold, switch to a lightweight fallback model or response mode. - Harden Multi-Agent Systems
Place timeouts and behavior boundaries between autonomous agents to prevent infinite loops.
Final Thoughts
AI models aren’t just smart — they’re also computationally hungry, and that makes them fragile in new ways.
MoDoS attacks shift the denial-of-service threat from ports and packets to tokens and tensors.
If you don’t defend your model’s attention — attackers will consume all of it.
Categories: Artificial Intelligence, Cybersecurity Blog
Leave a Reply