At a glance
- Controls
- CWE-306 · A07:2021 Identification and Authentication Failures
What it is
Agents call tools through small servers, such as MCP servers or internal HTTP endpoints. These are often built quickly and assume only the agent will call them. Some check no identity at all.
An attacker who can reach the server calls its tools directly. That gives them whatever the tool can do, such as reading files, querying data or sending messages. AI-assisted attackers can scan for these servers and read their tool lists to work out quickly what each one offers.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- MCP servers bound to all network interfaces on a developer or build machine
- Internal tool endpoints exposed through a load balancer or tunnel
- Tool servers that trust any request from inside the cluster
- Local tool servers reachable from a web page through the browser
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the tool server code and configuration to see how it checks callers and where it listens.
- 02From a test client with no credentials, request the server's tool list.
- 03Call one read-only tool on test data with no credentials and record whether it answers.
Every tool an agent can call must authenticate its caller.
Executable checkas anonymous: list tools on the tool server expect: 401 as anonymous: call a read-only tool with test input expect: 401 and no tool output in the body
Every rule MATT holds →What the fix looks like
- 01
Require an authenticated, per‑caller token on every tool call.
- 02
Check that each caller may use each tool, and log every call.
- 03
Bind local tool servers to localhost only and check the request origin.
- 04
Keep tool servers off public networks and behind network rules.
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? →