CWE-770AvailabilitySeverity · Medium

Lists without pages

A list endpoint that returns every row in one response lets a single call load a whole table. Repeated calls can exhaust memory and slow the service.

At a glance

Controls
CWE-770
Typical severityMedium
ReferenceCWE-770

What it is

Some list endpoints return every matching record in one response. As the table grows, each call takes more memory, more database time and more bandwidth. Even when page size is offered, a missing upper limit lets a caller ask for everything.

An attacker calls the endpoint in a loop, or sets the page size to a huge number. The database and the application server slow down for everyone. AI tools can read an API description and spot list endpoints with no limit in seconds.

Where it hides

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

  • Export and download endpoints for orders, users or transactions
  • Admin and reporting lists that were built for small data sets
  • Page size or limit parameters that accept any number
  • Search endpoints that return all matches

How MATT tests it

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

  1. 01Sign in with the test login and call each list endpoint with no paging parameters
  2. 02Call it again with a very large page size and note how many rows come back
  3. 03Compare response size and time against the documented limit, using only the test account's own data
The rule, in plain English

Every list must be paginated with a maximum page size.

Executable check

as any user: GET /v1/orders expect: no more than the maximum page size of rows as any user: GET /v1/orders?limit=1000000 expect: 400, or a response capped at the maximum page size

Every rule MATT holds →

What the fix looks like

  1. 01

    Add pagination to every list endpoint, using cursors where tables are large

  2. 02

    Set a default page size and a hard maximum on the server

  3. 03

    Reject or clamp page sizes above the maximum

  4. 04

    Move bulk exports to a queued job with its own limits

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