At a glance
- Controls
- CWE-284 · A01:2021 Broken Access Control
What it is
Requests from the web app usually check which tenant the caller belongs to. Background jobs run later, with no signed-in user, and act on whatever tenant ID was placed in the job. If that ID came from the request, the caller chose it.
An attacker starts an export or report and changes the tenant or account ID in the request. The job runs with full access and delivers another customer's data to the attacker's inbox or download link. AI-assisted attackers test every ID field in a request, including ones that only matter later.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Data export and download jobs
- Scheduled reports and email digests
- Webhook delivery and sync jobs
- Import jobs that write records under a tenant ID from the file or request
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the code to see where each job gets its tenant ID and whether it checks it.
- 02Create two test tenants, then as a user in tenant A start an export with tenant B's ID in the request.
- 03Record whether the job output holds any tenant B test data.
Work done for one customer must never read or write another customer’s data.
Executable checkas user in tenant A: POST /v1/exports with tenant_id set to tenant B expect: 403, or the job runs for tenant A only open the export output expect: no record from tenant B
Every rule MATT holds →What the fix looks like
- 01
Take the tenant ID from the signed‑in session when the job is created, and ignore any value in the request.
- 02
Re‑check that the job's creator still belongs to that tenant when the job runs.
- 03
Scope every query in the job to the tenant ID, ideally through row‑level security or a tenant‑scoped data layer.
- 04
Send job output only to users of the same tenant.
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? →