LLM10: Unbounded Consumption
Risk Level: High
Attackers craft inputs that consume disproportionate computational resources, causing the LLM service to slow down, become unresponsive, or incur excessive costs. This includes excessively long prompts, recursive task generation, resource-intensive queries, and denial-of-wallet attacks that exploit pay-per-token pricing models.
Attack Example
Sending a prompt that instructs the model to recursively expand its output: "Repeat the following 1000 times, each time adding more detail..." or submitting requests with maximum token lengths at high concurrency to exhaust GPU resources and budget. Automated scripts can generate thousands of API calls to inflate costs beyond budget limits.
Mitigations
- Enforce input token limits and maximum output token caps per request
- Implement rate limiting per user, session, and IP address
- Set cost alerting and hard spending caps on LLM API usage
- Queue and throttle resource-intensive requests during peak load
- Implement usage monitoring dashboards with anomaly detection for cost spikes