AI agents are becoming increasingly capable of accessing systems, making decisions and executing tasks on our behalf. But what happens when an attacker convinces one of these agents to do something it was never supposed to do?
Artificial Intelligence is changing the way we work, and there is little doubt that its capabilities will continue to grow. We have moved from chatbots that answer questions to AI agents capable of executing commands, interacting with applications, accessing databases and performing complex tasks with limited human intervention.
Impressive? Absolutely.
But from a cybersecurity perspective, there is a rather uncomfortable question we should be asking: Are we giving AI agents more access and authority than we should?
The concern is not that AI will suddenly develop malicious intentions. The problem is considerably more familiar. We are introducing powerful new technologies into our environments, giving them access to sensitive information and critical systems, and potentially repeating some of the same security mistakes we have spent decades trying to eliminate.
The New Attack Surface Nobody Should Ignore
Traditional cybersecurity has always placed considerable emphasis on controlling what users and applications can access. Authentication, authorisation, least privilege and separation of duties are fundamental security principles.
AI agents should be no different.
The challenge is that an AI agent can interpret information, make decisions and invoke tools based on the instructions and data it receives.
Imagine an organisation deploying an AI agent to assist its employees. The agent can read emails, access internal documents, search corporate databases and interact with business applications.
All perfectly reasonable capabilities, provided the appropriate security controls are in place.
Now imagine an attacker manages to place malicious instructions inside a document that the agent is about to read.
The attacker doesn’t necessarily need to compromise the AI model, steal credentials or exploit a traditional software vulnerability. Instead, they attempt to manipulate the agent through the information it consumes.
Welcome to the world of prompt injection.
Prompt Injection: When Data Becomes Instructions
Prompt injection is one of the most interesting security challenges associated with Large Language Models (LLMs).
In simple terms, it involves placing malicious instructions in content processed by an AI system, attempting to influence its behaviour in ways that conflict with its legitimate instructions.
Consider the following scenario.
An employee asks an AI agent to summarise a document received from an external supplier. Unknown to the employee, the document contains hidden or disguised instructions telling the agent to retrieve confidential information and send it to an external destination.
If the agent treats those instructions as authoritative, and has the necessary permissions and tools, the consequences could be serious.
This is known as indirect prompt injection, because the malicious instructions are introduced through external content rather than directly by the legitimate user.
Importantly, encountering malicious instructions does not automatically mean the attack will succeed. The outcome depends on the agent’s architecture, permissions, safeguards and the actions it is allowed to perform.
The underlying problem is the failure to maintain a reliable boundary between untrusted data and trusted instructions.
And that should sound familiar to anyone who has spent time working in cybersecurity.
The Real Danger: Excessive Privileges
Prompt injection is concerning, but the potential damage becomes significantly greater when an AI agent has excessive permissions.
An agent with read-only access to a limited collection of documents presents a very different risk from one capable of executing operating system commands, modifying databases, sending external communications or managing cloud infrastructure.
The issue is not simply whether an AI agent can be manipulated.
It is what the agent can do if that manipulation succeeds.
OWASP identifies several important risks associated with AI agents, including tool abuse, privilege escalation, data exfiltration, memory poisoning and excessive autonomy.
These are not entirely new security concepts. What is new is the way they can interact within systems that interpret natural language and autonomously select actions.
An agent operating with unnecessary administrative privileges could turn what might otherwise have been a relatively limited prompt injection into a much more serious security incident.
We have been advocating least privilege for decades. There is no sensible reason to abandon it simply because the software now comes with an AI label.
What Should Organisations Be Doing?
The answer is not to stop using AI agents. Their potential benefits are too significant to ignore.
However, organisations need to approach their deployment with the same security discipline they would apply to any other privileged application or automated system.
There are several areas worth particular attention:
1. Apply least privilege. AI agents should only have access to the systems, information and tools necessary to perform their assigned tasks. Avoid unrestricted access and unnecessary administrative privileges.
2. Separate instructions from untrusted data. Emails, websites, documents and external API responses should never automatically be treated as trusted instructions. Input filtering and clear trust boundaries help, although neither guarantees protection against prompt injection.
3. Control tool execution. Sensitive operations should be subject to independent authorisation checks. Never rely exclusively on an AI model to decide whether an action is permitted.
4. Require approval for high-risk actions. Financial transactions, privileged configuration changes, deletion of information and other sensitive operations should require appropriate human approval.
5. Monitor and audit agent activity. Organisations should maintain visibility into tool calls, access to sensitive resources, authorisation decisions and unusual behaviour, while protecting confidential information in logs.
6. Test agents as potential attack targets. Security assessments should include indirect prompt injection, attempts to abuse tools, privilege escalation, data exfiltration and manipulation of persistent agent memory.
These recommendations are consistent with OWASP’s published guidance on AI agent security. OWASP Cheat Sheet Series
Final Thoughts
We are entering a period where AI systems will increasingly perform tasks that previously required human intervention.
That presents tremendous opportunities, but it also introduces security challenges that deserve considerably more attention than they are currently receiving.
There is something almost ironic about spending years implementing Zero Trust architectures, strengthening identity management and reducing privileged access, only to introduce AI agents with broad permissions and insufficient oversight.
AI agents are not inherently malicious, nor should we assume that every prompt injection attempt will be successful. But they are software systems that can be manipulated, misconfigured or granted excessive authority.
And attackers will undoubtedly look for opportunities to exploit those weaknesses.
There are many other areas worth exploring, including AI supply chain security, agent-to-agent communication, persistent memory manipulation and the security implications of the Model Context Protocol (MCP).
For now, perhaps the most important question organisations should be asking is a simple one: If one of our AI agents were manipulated tomorrow, what could it actually access, change or disclose?
If the answer is unclear, there is probably some security work to be done.
Be the first to comment