Toloka welcomes new investors Bezos Expeditions and Mikhail Parakhin in strategic funding round

Toloka welcomes new investors Bezos Expeditions and Mikhail Parakhin in strategic funding round

Toloka welcomes new investors Bezos Expeditions and Mikhail Parakhin in strategic funding round

The new frontier of cybersecurity: a guide to AI agent security

June 18, 2025

June 18, 2025

Essential ML Guide

Essential ML Guide

Securing the future of autonomous AI

A new paradigm in artificial intelligence is emerging, promising to reshape our digital landscape in ways we are only beginning to comprehend. We are about to experience a major change powered by autonomous AI agents, sophisticated entities capable of understanding our requests and taking action, interacting with the world, and executing complex tasks on our behalf. In fields like healthcare, they promise to manage patient data and streamline diagnostics; in finance, they could execute trades and perform real-time risk analysis. The potential of these AI agents is boundless. Yet, this extraordinary power comes with a commensurate level of risk. The autonomy that makes AI agents so revolutionary also renders them a prime target for malicious actors, opening up a new and formidable frontier in the ongoing battle for cybersecurity. Therefore, the field of AI agent security is not just a niche, but a critical necessity for the future.

At its core, an AI agent is a leap beyond the conversational AI and chatbots we have grown accustomed to. While a chatbot can provide information or answer questions within a relatively closed system, an AI agent can interact with the external world through tools and APIs. This allows an agent to, for instance, not only tell you about the best restaurants in your area but also to make a reservation for you, book a ride to get you there, and add the event to your calendar without direct human intervention for each step. This capacity for independent action and complex task execution is the hallmark of agentic AI systems. The challenge of securing AI agents becomes immediately apparent with this level of autonomy.

This capability, however, is a double-edged sword. As we delegate more and more responsibility to these autonomous AI agents, we are entrusting them with access to our sensitive data, systems, and digital lives. The security of these AI agents is not merely a technical concern; it is a fundamental prerequisite for the safe and successful integration of this transformative technology into our society. Our central challenge is that the traditional security paradigms, designed for a world of predictable, human-driven interactions, are ill-equipped to handle the dynamic and often unpredictable nature of autonomous AI agents. These significant security risks require a new approach.

Ensuring robust AI agent security is a critical challenge that requires a multi-layered, defense-in-depth strategy. This approach must be holistic, encompassing robust authentication to verify the identity of both human user and AI users, stringent access control to limit the potential damage a compromised agent can inflict, continuous monitoring to detect and respond to anomalous agent behavior, and the development of novel security measures specifically designed to counter emerging threats that are unique to agentic AI systems. This article will explore the evolving landscape of AI and the rise of agent systems, provide a comprehensive taxonomy of the threats and vulnerabilities these AI agents face, and detail a multi-layered defense strategy for building secure AI agents and, by extension, secure AI systems.

The evolving landscape of AI and the rise of agentic systems

The journey from the early, rule-based expert systems of the 20th century to the sophisticated AI systems of today has been one of exponential growth. For many, the most tangible manifestation of this progress has been the rise of conversational AI and chatbots. These systems, powered by Large Language Models (LLMs), have demonstrated a remarkable ability to understand and generate human-like text, enabling them to serve as customer service assistants, content creators, and personal productivity tools. However, the evolution of AI is far from over. The next logical step in this progression is the move from mere conversation to autonomous action – the realm of the AI agents.

The key differentiator between a chatbot and modern AI agents lies in the latter's ability to interact with the external world. While a chatbot's capabilities are primarily confined to the information contained within its training data, an AI agent can be equipped with a suite of external tools and APIs to perform real-time actions. These tools can range from simple utilities, like a calculator or a calendar integration, to more powerful capabilities, such as browsing the web, sending emails, executing code, or interacting with third-party software platforms. Integrating external systems transforms a passive conversationalist into an active participant in our digital lives. The AI agent architecture must be designed with these integrations in mind, which presents unique security challenges. The power and promise of AI agents are immense. In the business world, these AI agents have the potential to automate a wide array of complex processes, from supply chain management and financial analysis to customer relationship management and software development. For individuals, AI agents can act as hyper-personalized assistants, capable of managing our schedules, planning our trips, and even anticipating our needs. The vision is one of a seamless, hyper-efficient future where AI agents act as our trusted digital proxies, freeing up human ingenuity for more creative and strategic endeavors.

However, the very features that make AI agents so powerful also make them incredibly vulnerable. The expanded attack surface these agent systems present is a direct consequence of their increased autonomy and connectivity. Every tool an agent is given access to, every API it can call, and every system it can interact with represent potential attack vectors. A compromised agent is no longer just a source of misinformation; it can become a powerful weapon in the hands of a malicious actor, capable of stealing sensitive data, executing fraudulent transactions, launching cyberattacks, or enabling remote code execution. The conversation around agent security must address these potential risks.

Furthermore, the unique nature of AI agents introduces a new set of risks that are not present in traditional software systems. One of the most significant is the inherent lack of human judgment. No matter how sophisticated its underlying language models, an AI agent does not possess the nuanced understanding, ethical compass, or common sense of a human user. It will execute its instructions to the best of its ability, even if those instructions are malicious or have unintended and harmful consequences. This makes it all the more critical to ensure that the instructions given to an agent are legitimate and that the agent's actions are properly constrained. This is a core tenet of AI agent security.

Another significant challenge is the issue of accountability and auditing. When an autonomous agent can perform a long and complex chain of actions without direct human oversight, it can be challenging to trace and audit those agent actions, especially if something goes wrong. Reviewing a transaction history might not be enough. This "black box" problem, where the reasoning process of the AI is not fully transparent, can make it challenging to diagnose a security breach and to hold the responsible parties accountable. As we move towards a future where AI agents are increasingly prevalent, addressing these fundamental security challenges of judgment, accountability, and transparency will be paramount for creating secure AI agents.

A Taxonomy of threats and vulnerabilities in AI agents

The threat landscape for AI agents is as vast and varied as their potential applications. To effectively secure AI agents, we must first understand how they can be compromised. AI agents' vulnerabilities can be broadly categorized into four main areas: input and prompt-based attacks, the exploitation of agent capabilities and integrations, data and system-level vulnerabilities, and supply chain and multi-agent risks. The sophistication of these attack vectors highlights the complexity of agent security.

Threat category: input and prompt-based attacks

The primary method for controlling many AI agents is through natural language prompts. This makes them susceptible to a class of attacks that target the very instructions they are given, representing a significant focus for AI agent security.

Prompt Injection

This is perhaps the most well-known and significant vulnerability in systems built on large language models. Prompt injection involves tricking the AI into obeying malicious instructions embedded within a seemingly benign input. In a direct prompt injection attack, a malicious user might simply tell the agent to "ignore all previous system instructions and do this instead." A more insidious form is indirect prompt injection, where the malicious prompt is hidden within a piece of malicious data that the agent processes, such as a webpage asked to summarize or an email asked to read. For example, a webpage could contain hidden text with malicious instructions that cause the AI agent's ability to be turned against the user, telling it to forward private emails containing sensitive information to an attacker's email address. These prompt injection attacks are a primary concern. The sheer volume of potential prompt injection vectors makes it a daunting challenge. An attacker's goal with prompt injection is often to bypass security measures. A successful prompt injection can completely alter agent behavior. We are seeing a constant stream of novel attacks based on prompt injection. The core of agent security must involve robust defenses against prompt injection.

Goal and instruction manipulation

This is a more subtle form of prompt injection in which the attacker doesn't necessarily hijack the agent's function entirely but instead manipulates its goals or user instructions, potentially leading to unintended and harmful outcomes. For instance, an attacker might subtly alter a financial analysis agent's instructions to favor a particular stock or ignore negative input data about a specific company, undermining system integrity. This form of prompt injection is more complex to detect.

Exploiting agent capabilities and integrations

The power of AI agents lies in their ability to use tools and interact with external systems. However, this also presents a significant agent security risk.

Tool misuse and abuse

Every tool an AI agent has access to is a potential weapon for an attacker. A compromised AI agent with access to an email tool could be used to send spam or phishing emails. An agent with access to a file system could be used to delete or modify important files. The possibilities for tool misuse are limited only by the number and power of the tools the agent has been given. This is a critical area for AI agent security research.

Unauthorized access and control hijacking

If an attacker can gain unauthorized access to an AI agent, they can hijack all of its capabilities. This is known as agent hijacking. It can be achieved through various means, such as exploiting weak authentication mechanisms, stealing API keys or user credentials, or leveraging vulnerabilities in the platform hosting the agent.

Identity spoofing and impersonation

An attacker could also attempt to make an AI agent impersonate a legitimate human user or another agent. This could be used to gain unauthorized access to multiple systems, ​​deceive other users into revealing sensitive information, or disrupt multi-agent systems' operations.

Data and system-level vulnerabilities

Beyond the direct manipulation of the agent itself, a number of vulnerabilities also target the sensitive data and systems that the agent relies on. Protecting this data is a key goal for securing AI agents.

Data exposure and exfiltration

AI agents often require significant data access to a vast amount of sensitive data, including personal information, financial records, and proprietary business data. A compromised agent can exfiltrate this sensitive data to an unauthorized party, a form of data leakage. Preventing data exposure is a key pillar of agent security. The risk of data leakage is high with improperly configured AI agents.

Knowledge base poisoning

Many AI agents depend on a knowledge base built from training data to inform decision-making. An attacker could attempt to "poison" this knowledge base by introducing false or misleading malicious data. This could cause the agent to make flawed decisions, to spread misinformation, or to act in ways that are beneficial to the attacker.

Memory and context manipulation

AI agents often maintain a "memory" of past user interactions to provide context for future conversations. An attacker could attempt to manipulate this memory to influence the agent's future actions. For example, an attacker could subtly introduce false information into the agent's memory that would cause it to distrust a legitimate user or take a specific action later. Monitoring the transaction history of changes can be a mitigation.

Resource and service exhaustion/denial of service (DoS)

Like any other software system, AI agents are vulnerable to denial-of-service attacks. An attacker could bombard an agent with a high volume of requests, overwhelming its resources and making it unavailable to legitimate users. Setting strict CPU and memory limits is a crucial security measure to prevent this.

Supply chain and multi-agent risks

The agent security of an AI agent is also dependent on the security of its underlying components and the other AI agents it interacts with.

Supply Chain Vulnerabilities

AI agents depend on a complex supply chain of third-party tools, libraries, and pre-trained language models. Supply chain vulnerabilities in any one of these components could be used to compromise the entire agent, making it one of the most difficult security challenges to address.

Orchestration and multi-agent exploitation

The risk of cascading failures becomes a significant concern as we move towards a future with multi-agent systems where multiple agents interact. A compromise in a single agent could spread to other AI agents it interacts with, potentially leading to a large-scale security breach. The complexity of these agent interactions introduces novel security challenges.

Agent communication poisoning

The communication channels between agents can also be a target for attack. An attacker could inject malicious information or commands into these channels to disrupt the workflow of a multi-agent system or turn the AI agents against each other.

A multi-layered defense strategy for securing AI agents

Given the multifaceted nature of the key threats facing AI agents, a single, one-size-fits-all security solution is simply not enough. Instead, we must adopt an in-depth defense strategy, creating multiple layers of security that work together to protect these AI systems from compromise. This multi-layered approach to AI agent security should encompass foundational security practices, agent-specific defenses, and continuous monitoring and response. This is how we build secure AI systems.

Defense Layer 1: Foundational Security Practices

Before we can address AI agents' unique vulnerabilities, we must ensure that we have a solid foundation of traditional cybersecurity best practices in place. These security measures are the first line of defense.

Robust authentication and authorization

This is the bedrock of any secure system. We need strong authentication mechanisms to verify the identity of the human user interacting with AI agents and the AI agents themselves. This can include using API keys, OAuth 2.0, and OpenID Connect (OIDC). Once a user or agent has been authenticated, we must use a principle of least privilege for authorization. This means that each agent should only be given the bare minimum level of agent permissions and data access needed to perform its designated tasks. Implementing role-based access control is a non-negotiable security measure here. Strong access control is fundamental to agent security.

Secure coding and development practices

The code that underpins the AI agent, its execution environment, and its integrated tools must be written with security in mind. This means following a secure software development lifecycle (SDLC) that includes regular security reviews, vulnerability scanning, and penetration testing within the agent frameworks.

Input validation and sanitization

This is a critical defense against prompt injection attacks. All inputs to the AI agent and its tools, whether user input or data from external systems, must be carefully sanitized and validated to ensure they do not contain malicious code or instructions. This includes checking the type, format, and range of all input data and stripping out any special characters that could be used to bypass security measures.

Defense Layer 2: agent-specific defenses

In addition to these foundational security practices, we ​​need to implement several defenses specifically designed to address AI agents' unique vulnerabilities.

Prompt hardening and engineering

This involves carefully crafting the initial instructions, or "meta-prompt," which act as system instructions given to the AI agent to make it more resistant to prompt injection attacks. This can include clearly defining the agent's role and limitations, providing explicit instructions on what to do and what not to do, and including safeguards instructing the agent to block an out-of-scope agent request. This is a core component of defending against prompt injection.

Content filtering and monitoring

We can also use content filters to monitor the AI agent's inputs and outputs in real time. These filters can detect and block a wide range of threats, including prompt injection attempts, the leakage of sensitive data, the generation of malicious code, and attempts to access malicious URLs.

Human-in-the-Loop (HITL) Controls

For particularly critical or sensitive agent actions, it is often a good idea to implement a "human-in-the-loop" control. This concept falls under the principle of well-defined human controllers. This means the agent must seek approval from a human user before taking a specific action. This can act as a crucial "circuit breaker," preventing a compromised agent from causing serious harm. For this to be effective, the approval workflow must be designed for security and efficiency, ensuring that human oversight does not become a bottleneck hindering operational speed.

Sandboxing and isolation

To limit the potential damage from unintended actions or a compromised agent, it is a good practice to run the agent and its tools in a sandboxed execution environment. This means the agent is isolated from the underlying operating system and other applications, with strict agent permissions and CPU and memory limits. This isolation is a key part of the AI agent architecture.

Defense Layer 3: continuous monitoring and response

Agent security is not a one-time fix; it is an ongoing process. We must continuously monitor our AI agents for signs of compromise and have a plan to respond quickly and effectively if a security breach occurs.

Comprehensive logging and auditing

We need to maintain detailed logs of all agent activity. This is essential for monitoring the agent's behavior, conducting forensic investigations after a security breach, and ensuring accountability. This includes logging every agent request, its outcome, and its associated transaction history.

Anomaly detection

We can use AI and machine learning techniques to monitor ​​our AI agents and detect any anomalies indicating a compromise. An anomaly detection system could flag a sudden spike in an agent's email sending or an attempt by the agent to access a system that it has never accessed before. Effective anomaly detection is vital for real-time AI agent security. Systems can also be trained for tasks like fraud detection.

Incident response planning

We must have a well-defined incident response plan to respond quickly and effectively to any security breach. This plan should include identifying and containing the threat, mitigating the damage to system integrity, and restoring the system to a secure state.

"Emergency off-switches"

It is also a good idea to have a mechanism in place to quickly disable or restrict an AI agent's capabilities in the event of a security incident. This "emergency off-switch" is crucial for preventing a bad situation from worsening.

Conclusion: The collaborative path to secure AI

We are at the dawn of a new era that the rise of autonomous agents will define. The potential of this technology to revolutionize our world is undeniable, but so are the security risks. The AI agent security of these AI agents is not an afterthought; it is a fundamental prerequisite for their safe and successful adoption. As we have seen, the threats are many and varied, ranging from the subtle manipulation of prompts via prompt injection to the outright hijacking of an agent's capabilities. To counter these threats, we must adopt a multi-layered, defense-in-depth approach as sophisticated and dynamic as the AI agents we are trying to protect.

The path forward requires a collaborative effort. Security research must continue to explore the vulnerabilities of AI agents and develop new and innovative defense mechanisms. Developers must embrace a security-first mindset, building robust and resilient agent frameworks from the ground up to secure AI agents. Security professionals must adapt their skills and strategies to meet the unique security challenges of this new frontier. Major security concerns still need to be addressed by the community.

The future of agent security will likely involve a new generation of AI-powered defense mechanisms, including self-securing AI agents that can detect and respond to threats independently. But technology alone is not enough. We must also develop new standards, regulations, and best practices to govern the development and deployment of these robust AI systems. A focus on reducing supply chain vulnerabilities and improving anomaly detection will be key.

Ultimately, the goal is to strike a balance between harnessing the transformative power of AI agents and managing the associated security challenges. This is a delicate balancing act, but it is one that we must get right. The decisions we make today will shape the future of artificial intelligence and determine whether we build a more efficient, productive, secure, and trustworthy future. The journey ahead is challenging, but by working together and prioritizing a culture of security, we can build a resilient foundation for the autonomous future of all AI agents.

Subscribe to Toloka News

Case studies, product news, and other articles straight to your inbox.

Subscribe to Toloka News

Case studies, product news, and other articles straight to your inbox.

Subscribe to Toloka News

Case studies, product news, and other articles straight to your inbox.

More about Toloka

What is Toloka’s mission?

Where is Toloka located?

What is Toloka’s key area of expertise?

How long has Toloka been in the AI market?

How does Toloka ensure the quality and accuracy of the data collected?

How does Toloka source and manage its experts and AI tutors?

What types of projects or tasks does Toloka typically handle?

What industries and use cases does Toloka focus on?

What is Toloka’s mission?

Where is Toloka located?

What is Toloka’s key area of expertise?

How long has Toloka been in the AI market?

How does Toloka ensure the quality and accuracy of the data collected?

How does Toloka source and manage its experts and AI tutors?

What types of projects or tasks does Toloka typically handle?

What industries and use cases does Toloka focus on?

What is Toloka’s mission?

Where is Toloka located?

What is Toloka’s key area of expertise?

How long has Toloka been in the AI market?

How does Toloka ensure the quality and accuracy of the data collected?

How does Toloka source and manage its experts and AI tutors?

What types of projects or tasks does Toloka typically handle?

What industries and use cases does Toloka focus on?