AI and network security

Are AI agents a security risk for businesses?

Yes. An AI agent reads content it cannot fully trust, holds credentials and can take actions, so anyone who can put instructions in front of it may be able to steer it. The main risks are prompt injection, agents given more access than their task needs, leaked credentials, and data sent somewhere it should not go. They are manageable when each agent's access, tools and outbound paths are kept narrow.

TL;DR

AI agents are a security risk because they read untrusted content, hold credentials and act, and OWASP says prompt injection may not be fully preventable. The danger peaks when one agent has private data, untrusted content and a way to send data out, so remove one of them. Agents on a local network without internet lose that path.

Learning objectives

After reading this article you will be able to:

  • Identify the main security risks of AI agents using OWASP's 2025 LLM Top 10
  • Assess a proposed agent against the lethal trifecta of private data, untrusted content and outbound communication
  • Limit an agent's damage with narrow tools, scoped credentials, human approval and fewer outbound paths

Prompt injection in AI agents

AI agents combine three things software rarely had at once: they read content from many sources, they make decisions based on it, and they hold the credentials to act on those decisions. A language model cannot reliably tell an instruction from data, so anything an agent reads can try to change what it does.

OWASP’s 2025 Top 10 for LLM applications puts that first. Its entry on prompt injection separates direct injection, where a user types something that changes the model’s behaviour, from indirect injection, where the instructions are hidden in a website or file the model reads. OWASP also says that, given how models work, it is unclear whether fool-proof prevention methods for prompt injection exist. That is the starting point for any agent: assume it can be fooled, and limit what happens when it is.

AI agent security risks

The documented security risks of AI agents fall into five groups.

  • Prompt injection. Hidden instructions in an email, document, web page or tool result that the agent follows. OWASP lists it as LLM01.
  • Excessive agency. OWASP’s LLM06 describes agents with more functionality, permissions or autonomy than the task needs, for example an agent that only needs to read a calendar but holds a token that can also send email.
  • Sensitive information disclosure. The agent repeats or forwards data it should not, such as customer records, keys or internal documents. OWASP lists it as LLM02.
  • Supply chain. Plugins, tool servers and models from third parties run with the agent’s access. The Model Context Protocol security guidance warns that local MCP servers run with the same privileges as the client and, without sandboxing and consent, allow arbitrary code execution.
  • Credential misuse. Agents need keys to reach tools, and those keys leak through logs, prompts and misconfigured servers. The MCP guidance forbids token passthrough, where a server forwards a token that was issued for a different service.

And the same tools work for attackers. In November 2025, Anthropic reported that a group it assessed as Chinese state-sponsored used its agentic coding tool to perform 80 to 90 percent of an espionage campaign against about thirty organisations, succeeding in a small number of cases.

AI agent risk assessment

To judge whether an agent is too risky, check it against the lethal trifecta. Simon Willison’s test asks whether one agent has all three of: access to private data, exposure to untrusted content, and the ability to communicate externally. With all three, an attacker who gets instructions into the content can make the agent send the data out.

For each agent your business plans to run, write down:

  1. What data it can read. Customer records, email, files, source code, finance systems.
  2. What untrusted content reaches it. Inbound email, web pages, uploaded files, tickets from the public, other agents’ output.
  3. Where it can send things. Email, web requests, chat, file shares, other APIs.
  4. What it can change. Records, payments, permissions, code, devices.
  5. What credentials it holds, and for how long.

If all of the first three are present, remove one before going further. If the fourth includes anything irreversible, put a human approval in front of it.

Least privilege for AI agents

Limiting the damage an agent can do means narrowing its tools, its permissions and its paths out. OWASP’s guidance on excessive agency is specific:

  • Limit the extensions an agent can call to the minimum necessary, and avoid open-ended ones such as a general shell or arbitrary URL fetch.
  • Give each extension the least permission it needs, and run it in the context of the user it acts for.
  • Require a human to approve high-impact actions.
  • Validate every downstream request against policy rather than trusting the agent’s output.
  • Log, monitor and rate-limit what agents do.

Pair that with credentials that expire on their own, scoped to one agent and one task, and with MCP servers installed only from sources you trust.

Local coordination and agent risk

Local coordination removes the leg of the trifecta that turns a manipulated agent into a breach. An agent that can only talk to known devices on a local network, and has no general route to the internet, has nowhere to send stolen data even if hidden instructions tell it to.

Offline Protocol gives agents that kind of network. Agents and apps on phones, computers and gateways advertise capabilities, discover each other and call each other request and response over Bluetooth LE, Wi-Fi and local IP, multi-hop across the mesh, with no broker and no internet. Every device proves itself with an Ed25519 key it generated, request and response bodies are sealed in an MLS session once one is confirmed, and each provider decides which requesters it serves. The SDK discovers providers; your application decides the policy. That is the division of labour that keeps agents useful: they coordinate freely with the devices around them, and the only path to the wider internet is the one you chose to give them.

Frequently asked questions

What is prompt injection?

Input that changes what a language model does in ways its developer did not intend. It can come directly from a user, or indirectly from content the model reads, such as a web page, an email or a file, which is the more dangerous case for agents.

What is excessive agency?

OWASP's name for an agent that has more functionality, permissions or autonomy than its task needs. When the agent is manipulated or simply wrong, that extra access is what does the damage.

What is the lethal trifecta?

Simon Willison's term for an agent that has access to private data, is exposed to untrusted content and can communicate externally. With all three, an attacker who plants instructions in the content can make the agent send the data out.

Are MCP servers safe to use?

Only with care. The MCP security guidance warns that local servers run with the same privileges as the client and can execute arbitrary code, and that servers must not pass through tokens issued for other services. Install servers from sources you trust and grant the smallest scopes.

Can attackers use AI agents against my business?

Yes. Anthropic reported that a group it assessed as Chinese state-sponsored used its agentic coding tool to carry out 80 to 90 percent of an espionage campaign against about thirty organisations, succeeding in a small number of cases.

Should we stop using AI agents?

No. Deploy them the way you would grant access to a new contractor: only the tools and data the job needs, credentials that expire, approval for anything irreversible, and logs of what they did.

Sources

Build it with Offline Protocol

The service guide shows how agents and apps on nearby devices advertise and call each other's capabilities over the mesh, with each provider deciding which requesters it serves.

Read the service guide