At a glance
- Controls
- CWE-345 · A08:2021 Software and Data Integrity Failures
What it is
Tokens name who issued them and which service they are for. Many APIs check the signature and stop there. They never check the audience or issuer claims, so any token from a shared identity provider works.
An attacker gets a valid token from an easy place, such as a public app, a test client or a partner integration. They send it to a more sensitive API that shares the same identity provider. AI-assisted attackers read token claims and map which services trust which issuers, so they spot the gap quickly.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Several apps that share one identity provider or signing key
- Multi-tenant setups where each tenant has its own issuer
- Mobile, web and partner clients that all reach the same backend
- Internal service-to-service APIs that accept user tokens
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the code and configuration to see which issuer and audience each API expects.
- 02Sign in to a second test app or client that uses the same identity provider and take its token.
- 03Send that token to the target API with a safe read call and record whether it is accepted.
An API must accept only tokens issued for it, by the issuer it trusts.
Executable checkget a valid token issued for app X call GET /v1/me on API Y with that token expect: 401 send a token from an untrusted issuer to API Y expect: 401
Every rule MATT holds →What the fix looks like
- 01
Check the audience claim on every request and accept only this API's own audience.
- 02
Check the issuer claim against a fixed list of trusted issuers.
- 03
Give each tenant or app its own audience, and keep separate keys where trust levels differ.
- 04
Use separate credentials for service‑to‑service calls.
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? →