At a glance
- Controls
- CWE-770
What it is
Some features do heavy work each time they are called, such as building a PDF, resizing an image or running a large report. If every request starts that work at once, the cost lands on the same servers that answer everyone else. There is often no cap on how many a single user can start.
An attacker finds the heaviest feature and calls it again and again in parallel. Processors and memory fill up and the whole product slows down. Where the work uses paid services, the bill also climbs. AI tools can spot these endpoints from the code and script the calls quickly.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Invoice, statement and report PDF generation
- Image resizing and thumbnail endpoints that take size parameters
- Data exports and analytics reports
- Features that call paid external APIs, including AI models
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the code to find endpoints that run heavy work inside the request
- 02Sign in with the test login and call one such endpoint a small number of times in parallel
- 03Record whether the product queues or refuses extra calls, and stop before load could affect other users
Expensive operations must be queued and limited per user.
Executable checkas one user: POST /v1/reports/generate 20 times at once expect: 202 with a job id, or 429 once the per-user limit is hit expect: no more than the allowed number of jobs running for that user expect: other users' requests keep normal response times
Every rule MATT holds →What the fix looks like
- 01
Move heavy work to a background queue with a fixed number of workers
- 02
Limit how many jobs each user and organisation can run at once
- 03
Cache results for identical requests
- 04
Cap input sizes such as page counts and image dimensions
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? →