Unbounded Consumption of LLM Resources

The LLM feature sets no effective limits on request rates, input size, output length or agent steps, so users can exhaust its capacity or run up costs.

SeverityMedium
CVSS 3.16.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Open in the calculator
CVSS 4.07.1 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N Open in the calculator
CWECWE-770: Allocation of Resources Without Limits or Throttling
MITRE ATT&CKT1499.003 Application Exhaustion Flood
CategoryInsecure Design

Description

Every request to a large language model (LLM) consumes computing capacity and, with hosted models, money charged per token processed. The application does not limit that consumption effectively: users can send requests without a rate limit or quota, submit inputs as large as the model's context window allows, request outputs without a cap on their length, upload large documents for processing, or start agent tasks that call the model and its tools repeatedly with no limit on steps or time.

A user or attacker can therefore degrade or deny the LLM feature for everyone, either by saturating a self-hosted model or by exhausting the request and token quotas the model provider applies to the organisation's account, and can run up significant usage charges, an effect sometimes called denial of wallet. Provider quotas and spending limits cap the cost, but reaching them causes the same outage for legitimate users. Exploitation needs only access to the feature, often through a free or low-cost account. The same lack of limits allows heavy automated querying intended to copy a model's behaviour, for example to train a substitute model, which matters to organisations whose own models are a commercial asset.

The weakness is identified by sending repeated and concurrent requests and checking for throttling, submitting very large inputs, asking for unusually long outputs, and giving agent features open-ended or self-repeating tasks, while observing response times and the token usage that many model APIs report with each response. The absence of throttling responses, such as HTTP 429, and of per-user quotas confirms the finding.

Remediation

Set and enforce limits at every point where consumption can grow:

  • Apply per-user, per-tenant and per-address rate limits and daily token quotas in the application's back end or API gateway, returning HTTP 429 when they are reached.
  • Limit input size before calling the model, by characters or tokens, and limit uploaded file sizes and page counts for document features.
  • Set a maximum output length on every model call with the provider's output token parameter.
  • Cap agent loops by number of steps, tool calls, elapsed time and total tokens per task, and stop tasks that exceed them.
  • Limit concurrent requests per user, set timeouts, and queue work rather than accepting unlimited parallel requests.
  • Configure budgets, alerts and, where the provider supports them, hard spending limits, and monitor usage per user to detect abuse quickly.
  • Require authentication for model endpoints, and do not expose details that help model extraction, such as token probabilities, unless they are needed.

Confirm the fix by repeating the rate, size, length and agent tests, and checking that each limit is enforced on the server and reported clearly to the user.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More AI and LLM Applications Findings

Every AI and LLM Applications finding