CWE-250AI-written & agentic codeSeverity · High

Agents with standing broad access

An AI agent keeps admin-level tokens at all times, even for small jobs. One tricked or faulty step can then reach far more data and systems than the task needs.

At a glance

Controls
CWE-250
Typical severityHigh
ReferenceCWE-250

What it is

An agent is given one powerful token at setup and keeps it for every task. Most tasks need only a small part of that power. The extra access sits unused until something goes wrong.

An attacker who can steer the agent, for example through a crafted document or message, inherits all of that access. AI-assisted attackers can try many injected instructions quickly and watch which ones the agent follows. The wider the token, the bigger the reach of each success.

Where it hides

What a reviewer can look for in the code and in the behaviour, before anyone proves it.

  • Agent configuration files that load an admin API key or cloud role at start-up
  • Service accounts shared by several agents and background jobs
  • Integration tokens for code hosts, ticketing or messaging with full organisation scope
  • Database connections opened by agents with an owner or superuser role

How MATT tests it

The proof runs against the deployed product, on every release, whoever wrote the code.

  1. 01Read the agent's configuration and code to list the tokens and roles it loads and their scopes.
  2. 02Sign in with the test login and run an ordinary agent task, then compare the actions it performs with the scopes it holds.
  3. 03Ask the agent, through its normal input, to perform an action outside the task's purpose on test data, and record whether its credentials allow it.
The rule, in plain English

Each agent must hold only the permissions its current task needs.

Executable check

for each agent task: list the scopes of the credentials in use expect: each scope is needed by that task as the agent on task 'summarise ticket': call an admin endpoint on test data expect: 403

Every rule MATT holds →

What the fix looks like

  1. 01

    Issue short‑lived, task‑scoped tokens at the moment a task starts and revoke them when it ends.

  2. 02

    Give each agent its own identity so its access can be limited and audited separately.

  3. 03

    Require human approval for high‑impact actions such as deletion, payments or permission changes.

  4. 04

    Review agent scopes on every release and remove any that no task uses.

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? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02