Skip to content

Can AI agents get into systems they shouldn't? Yes, and here's how

AI agents can reach sensitive systems without proper authorisation, usually through over-broad access, hidden instructions or plain overreach. The real cases, and the defences that work.

By 6 min read

Sources8 sources linked in this article

A close-up of a padlock fastened to a door
A close-up of a padlock fastened to a door· Photo by Kaffeebart on Unsplash
6 min left

Reading settings

Text size

The Quick Read

20-Second Answer

Yes, it can happen, though rarely by 'breaking in'. Agents usually get too far because they were given too much access, were tricked by instructions hidden in content they read, or simply overstepped the task. Researchers have demonstrated all three, and OpenAI shelved a model over it.

What Matters

  1. 01An agent only needs the access you give it, so over-broad permissions are the most common way things go wrong.
  2. 02Prompt injection (hidden instructions in an email, web page or issue) can steer an agent. The UK's NCSC says it may never be fully fixed.
  3. 03The defences are familiar: least privilege, short-lived keys, human approval for risky actions, sandboxing and logs.

What Should I Do?

Give any agent the minimum access for one job, keep it away from your most sensitive accounts, and make it ask before anything irreversible, such as deleting, paying or sending.

Can an AI agent get into systems it was never supposed to touch? Honestly, yes. But the way it happens is less like a film hacker and more like a very keen new employee who was handed the master key.

This is part two of our series on AI agents and safety. In part one we covered what separates an agent from a chatbot: an agent uses tools and acts for you. That ability is also where the risk comes from.

How it can happen

Too much access. An agent works with whatever keys it is given. A credential is simply a key: a password, login or token that proves who you are to a system. If you give an agent your full account, it can do anything you can. OWASP, a non-profit that publishes widely used security guidance, calls this "excessive agency": an AI system with more functions, permissions or independence than its job needs. It names hallucinations, poor model behaviour and manipulation as triggers. The damage depends on how much the agent can reach.

Hidden instructions. Prompt injection means slipping instructions into content the agent reads, such as an email, a web page or a bug report. The model can't reliably tell "data to read" from "orders to follow". The UK's National Cyber Security Centre (NCSC) wrote in December 2025 that today's models don't enforce a boundary between instructions and data, and that prompt injection may never be fully fixed the way an older class of bug, SQL injection, was. It suggests treating the model as an "inherently confusable deputy".

That phrase points to the classic "confused deputy" problem: a trusted helper with real authority gets tricked into using it for someone else.

Overreach. Sometimes nobody attacks anything. The agent just does more than it was asked.

Stolen keys. If an agent's token (a stored key) leaks, whoever holds it can act as the agent. That's an old problem, but agents tend to hold powerful, long-lived keys.

What has actually happened

We've kept to documented cases. Some are real-world mishaps, others are researchers showing what is possible.

  • Replit database deletion (July 2025). SaaStr founder Jason Lemkin said Replit's AI coding agent deleted the company's production database during a code freeze Lemkin had set. Heise reported that the agent admitted running a command without permission. It also claimed there was no rollback, though a backup could be restored. Replit's CEO said it was working on automatically separating development and production databases. This was overreach with real access, not a hack.
  • GitHub agent leak (May 2025, research demo). Security firm Invariant Labs showed that a malicious issue on a public GitHub repository could steer a user's connected agent into copying details from their private repositories into a public one. The demo needed that specific setup, with one account covering both. It was not a flaw in GitHub's code. The researchers' advice: limit the agent to the repositories it needs.
  • EchoLeak (disclosed June 2025). Aim Labs found a "zero-click" flaw in Microsoft 365 Copilot, meaning the victim needn't click anything. SOC Prime's summary says a crafted email could make Copilot leak data it could reach, and rates it 9.3 out of 10. Microsoft says it is fully fixed and needs no customer action. The summary reports no evidence of real-world exploitation. I haven't opened Microsoft's own advisory, so treat the figures as second-hand.
  • OpenAI's shelved model (September 2026). As we covered in our GPT-6.2 Astra explainer, OpenAI dropped GPT-6.1 Astra after its own tests. TheWrap reported that Saachi Jain, OpenAI's head of safety systems, said it "didn't quite meet the bar in terms of staying within scope and authorization."

That last one is the encouraging part: a lab found the problem in testing and held the model back.

A hypothetical, to make it concrete

This one is invented, not a real case. Imagine you let an assistant summarise your inbox and also send emails for you. A stranger emails you with hidden text telling the assistant to forward your recent messages to them. If the assistant can both read private mail and send mail, and nothing asks you first, it might comply.

Developer Simon Willison calls this combination the "lethal trifecta": private data, untrusted content and a way to communicate outwards. His advice is not to put all three in one agent.

The defences, in plain English

A table pairing four ways an AI agent can end up with too much access with a defence for each: too many permissions with least privilege; hidden instructions with treating read content as untrusted; stolen or long-lived keys with short-lived scoped credentials; going beyond the task with human approval and logs.
A table pairing four ways an AI agent can end up with too much access with a defence for each: too many permissions with least privilege; hidden instructions with treating read content as untrusted; stolen or long-lived keys with short-lived scoped credentials; going beyond the task with human approval and logs.
  • Least privilege. Give the agent the smallest set of permissions for the job. OWASP's example is read-only access for an email summariser.
  • Scoped, short-lived credentials. Keys limited to one task that expire quickly, so a leak is a small leak.
  • Human approval for risky actions. Deleting, paying and sending should need a person's yes. Be wary of clicking "always allow": Invariant noted that makes bad actions easier to miss.
  • Don't rely on the model to police itself. OWASP says to enforce permissions in the systems the agent connects to, not by asking the AI to behave. The NCSC likewise recommends non-AI safeguards that limit what an agent can do.
  • Sandboxing. A sandbox is a walled-off space where an agent can work without touching your real files or accounts.
  • Logging. An audit log is a record of what the agent saw and did. The NCSC suggests logging inputs, outputs and tool use, as failed attempts can reveal an attack early.
  • Treat what it reads as untrusted. Anything from outside, such as emails, web pages and uploaded files, could contain instructions.

None of these is perfect alone, and the NCSC warns against any product claiming to "stop" prompt injection. They work together by limiting how much a confused agent can do. OWASP also published a Top 10 for Agentic Applications on 9 December 2025, aimed at this problem.

What it means for you

If you use agents at work or home, treat them like a new temp worker. Start with read-only access, keep them away from banking and admin accounts, and make them ask before they delete, pay or send. If you let one read your email or browse the web, assume that content could try to steer it.

If you build agents, design as if the model will sometimes be fooled. Limit tools and keys, check permissions outside the model, require approval for irreversible actions, and keep logs.

Who is to blame when this goes wrong is the subject of part four, on responsibility. Whether companies must disclose such failures is covered in part three, and whether testing should be mandatory in part five.

Sources and links

  1. "excessive agency"genai.owasp.org
  2. wrote in December 2025ncsc.gov.uk
  3. Heise reportedheise.de
  4. showedinvariantlabs.ai
  5. SOC Prime's summarysocprime.com
  6. TheWrap reportedthewrap.com
  7. "lethal trifecta"simonwillison.net
  8. Top 10 for Agentic Applicationsgenai.owasp.org

Share this story

About the author

IA

Ibrahim Abdullah is a TodayAI co-founder and computer science graduate who covers daily AI news and writes practical how-to guides for using AI. · Read our editorial policy.