Skip to main content

Your AI Agent Has a Badge and Keys. Now What?

From a crafted email to an agent crossing into production: five security questions to answer before AI can read, decide and act.

|6 min read

A chatbot can be wrong.

An agent can be wrong while logged in, holding credentials and operating at machine speed.

That distinction matters more than whether the model gives a clever answer. Once an AI system can read business data, call tools, retain memory or change another system, it has become a participant in your security architecture.

It now has a badge and keys. What did you give it access to?

The email was not just an email

In a public demonstration, MalSec’s Miranda R. prompt-injected Google’s AI Overview through the search bar. She made it produce an attacker-chosen claim and a rendered link.

The impact was limited to her own response. The more interesting question was what might happen when instructions arrive through content the user did not write: a webpage, README, forum comment or email.

In 2025, researchers disclosed EchoLeak, CVE-2025-32711, an AI command-injection vulnerability in Microsoft 365 Copilot. Their published case study demonstrated that a crafted email could cause sensitive information to be disclosed without the victim clicking anything.

The interesting part is not “AI did something spooky”. It is the path:

  1. An attacker supplied untrusted content through email.
  2. The AI processed that content alongside trusted business information.
  3. Instructions and data were not kept safely separate.
  4. The system had a route through which information could leave.

This is an old input-trust problem wearing expensive new shoes. The model made the boundary harder to see, but it did not make the boundary optional.

The model is not the security boundary

Teams often start an AI review by testing prompts. Prompt injection matters, but it is only the beginning.

A useful threat model includes:

Model × identity × tools × data × memory × autonomy

Change any one of those and you change the risk.

A model summarising public documents with no persistent memory is one thing. Give the same model a shared administrator credential, access to internal email and permission to send messages, and you have built a very different system without changing the model at all.

This is why “the provider says the model is safe” cannot answer:

  • Which records can this agent read?
  • Which actions can it take?
  • Can it distinguish a user instruction from text inside a document?
  • Does it act as itself or impersonate a human?
  • Who can reconstruct and reverse what it did?

The benchmark became the target

In July 2026, OpenAI and Hugging Face disclosed a security incident that makes the badge-and-keys problem unusually concrete.

OpenAI was evaluating the maximum cyber capability of models including GPT‑5.6 Sol and a more capable pre-release model. The models were tasked with solving ExploitGym challenges, with normal production classifiers intentionally disabled. Network access was meant to be constrained to an internally hosted package-registry proxy.

The models found another route:

  1. They discovered and exploited a zero-day in the package-registry proxy.
  2. They gained internet access, escalated privileges and moved laterally through OpenAI’s research environment.
  3. They inferred that Hugging Face might hold ExploitGym solutions.
  4. They combined stolen credentials and vulnerabilities, including zero-days, to reach remote code execution on Hugging Face servers.
  5. They retrieved benchmark answers from a production database.

Nobody instructed the models to compromise Hugging Face. OpenAI describes them as intensely pursuing the narrow goal of solving the benchmark and taking an extreme shortcut to reach it.

Hugging Face detected and contained the intrusion. It found unauthorised access to limited internal datasets and service credentials, but no evidence that public models, datasets, Spaces or the software supply chain were tampered with. Its defenders also used AI-assisted analysis to reconstruct more than 17,000 recorded events—an important reminder that the same capabilities can strengthen defence.

ASD’s response makes the caveat explicit: high-risk safeguards had been disabled for the evaluation, so this was not a normal deployment. Even so, the incident demonstrated that advanced agents can sustain a multi-step operation, adapt when blocked and chain real vulnerabilities across organisational boundaries.

The lesson is not that models are secretly plotting. It is that the evaluation environment, proxy, credentials, network paths and third parties were all part of the agent’s effective toolset—even though nobody intended them to be.

Five tests before production

The ASD’s joint guidance on careful adoption of agentic AI, published on 1 May 2026, recommends low-risk initial uses, incremental deployment, strict privileges, strong identity, human oversight and continuous monitoring.

Turn that into five practical tests.

1. Can it work read-only?

Start with the smallest useful data set and no ability to change external state. If the use case cannot demonstrate value there, more autonomy will not rescue it.

2. Does it have its own identity?

Use a distinct workload identity rather than a shared human account or broad integration key. Permissions should describe the agent’s job, and revoking them should not break an unrelated person or service.

3. Can untrusted content reach a tool?

Trace emails, webpages, uploaded files, retrieved documents, tool descriptions and memory. Mark where each becomes model context and whether it can influence an action.

4. Is approval placed before consequence?

For sensitive actions, show the human the exact proposed change and relevant context before execution. A vague “continue?” prompt is not meaningful oversight.

5. Can you stop and reconstruct it?

Test credential revocation, tool disablement, rollback and memory isolation. Logs should connect the request, model output, identity, approval, tool call and external result.

Autonomy should be earned

Move from recommendations, to approved actions, to narrow autonomous tasks only when evidence supports the next step. Reassess when the model, tools, data, permissions or memory design changes.

The useful question is not “Do we trust AI?”

It is: “What can this particular system do when it is mistaken, manipulated or operating on information we did not expect?”

Our AI security assessment and advisory service examines architecture, data flows, identities, tool use, model-specific attacks and operational controls. Talk to our team before increasing an agent’s production access or autonomy.