At a glance
- Controls
- CWE-915 · A08:2021 Software and Data Integrity Failures
What it is
The update endpoint takes the request body and writes every field it finds to the user record. The form only shows name and email. The record also holds role, plan, organisation or owner fields, and the server saves those too.
An attacker reads a normal response to learn the field names on their own record. They send the same update with role set to admin or plan set to the top tier. AI-assisted attackers guess likely field names from response shapes and common frameworks, so this takes minutes.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Profile and account settings endpoints
- Organisation or team member update routes
- Sign-up endpoints that accept a role or organisation ID
- Generic PATCH routes that bind the request body straight to a database model
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the code for update handlers that bind the whole request body to a model.
- 02Sign in as a test user and send a profile update that adds a role or plan field to that test user's own record.
- 03Read the test user's record back and confirm whether the extra field was saved, then restore it.
A user must never be able to change their own role, plan or ownership fields.
Executable checkas user A: PATCH /v1/me with {"name": "A", "role": "admin"} expect: 400, or 200 with the field ignored as user A: GET /v1/me expect: role unchanged
Every rule MATT holds →What the fix looks like
- 01
List the fields each endpoint may change, and ignore or reject everything else.
- 02
Use separate input types for user updates, with no role, plan or owner fields in them.
- 03
Change roles, plans and ownership only through dedicated admin or billing flows with their own checks.
- 04
Log and alert on any request that tries to set a protected field.
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? →