CWE-770Spend & resource abuseSeverity · Medium

Unlimited AI model spend

An endpoint that calls a paid AI model with no usage limit lets one account run up a large bill. The cost lands on the product owner within hours.

At a glance

Controls
CWE-770
Typical severityMedium
ReferenceCWE-770

What it is

Many products pass user requests to a paid model and pay per token. If the endpoint has no budget or rate limit, every request costs money with no ceiling. Long prompts and large outputs raise the cost of each call.

An attacker scripts a stream of expensive requests from one or many free accounts. AI-assisted attackers can also reuse such an endpoint as a free model for their own work, which drives usage further.

Where it hides

What a reviewer can look for in the code and in the behaviour, before anyone proves it.

  • Chat, summarise and generate endpoints
  • Agent features that call a model in a loop
  • Background jobs that run model calls on uploaded files
  • Free tier and trial accounts with access to model features

How MATT tests it

The proof runs against the deployed product, on every release, whoever wrote the code.

  1. 01Sign in with the test account and call the model feature at a small, agreed rate.
  2. 02Raise the rate and the input size step by step within the agreed limit, watching for throttling.
  3. 03Read the code path to confirm whether a per-user and per-account budget is checked before each call.
The rule, in plain English

Every call to a paid model must count against a per-user and per-account budget.

Executable check

as test user: send N model requests above the per-user budget expect: 429 or a clear budget-exceeded error expect: usage counter for the user and account increments on each call expect: oversize input returns 413 or 422

Every rule MATT holds →

What the fix looks like

  1. 01

    Meter tokens or calls per user and per account, and check the budget before calling the model.

  2. 02

    Cap input size, output length and loop depth for agent features.

  3. 03

    Set hard spending limits and alerts with the model provider.

  4. 04

    Give free and trial accounts lower limits than paid ones.

A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02