SBN

AI Agent Security Risks: When Software Starts Acting Autonomously


For the past two years, much of the conversation around AI security has revolved around governance. Which models are employees permitted to use? How do we regulate which data can be put into an LLM? How should we control access to generative AI?

These are important questions, but AI has moved well past governance while those questions still dominate the conversation.

AI’s current capabilities move beyond answering questions and generating content. It can now call APIs, retrieve data, invoke tools, execute workflows, and make decisions on a user’s behalf. AI is now part of the application environment rather than simply another application to govern.

This changes the attack surface and the way AppSec teams must approach AI security.

Some elements stay the same. APIs, identity systems, and untrusted input were already part of organizations’ architectures, and software dependencies already created supply-chain risk. AI connects those pieces differently. It has the ability to interpret instructions, make decisions, and act across systems, often with access that previously required several human steps.

Four issues now deserve particular attention.

AI Agent Security Risks: When Software Starts Acting Autonomously

An AI agent differs from a conventional application because it can reason what to do next.

A traditional application follows logic defined by its developers. An agent can interpret a request, select a tool, retrieve information, call an API, and independently decide what action to take based on the result. When it has access to enterprise systems, the agent becomes another actor in the environment with the ability to affect resources outside the model.

Access the team granted on purpose can produce unintended behavior it didn’t intend. It’s a familiar security problem in a less familiar form.

Let’s play it out with an example. Suppose an agent has access to an internal database, a ticketing system, a cloud environment, or customer information. It also has credentials or tokens that allow it to execute across those systems. An attacker doesn’t need to break into each underlying system. Instead, it manipulates the agent. The compromised agent becomes the attack path.

The sequence can differ based on the input the system receives. Runtime analysis solves for this by evaluating an agent’s actions against its surrounding request and session context, which deciphers behavior that departs from the application’s normal flow.

Prompt Injection: When Language Becomes the Exploit

Legacy applications treat untrusted input as data. A parameter, header, file, query, or other value that the application processes. AI systems add another input channel, one where natural language can influence what the system does.

Prompt injection lets an attacker craft instructions that alter a model’s behavior, change what it retrieves, or trigger a tool call it otherwise wouldn’t make. The potential impact depends largely on what the AI model is permitted to do. A manipulated LLM response may be inconvenient, while a manipulated agent that retrieves sensitive information, calls an API, or changes a record poses a much more serious risk.

The issue is missing context. A prompt that looks harmless on its own may look very different once paired with the user’s identity, previous instructions, retrieved content, available tools, and the resulting API calls. AppSec teams therefore need to look beyond the language itself and see what the instruction causes the application to do.

Runtime inspection evaluates the instruction in the context of the application’s behavior, including the tools it invokes and the actions that follow.

Model Supply Chain: When Dependencies Become Part of the Attack Surface

AI applications connect models to other components and services, including pretrained models, training data, retrieval systems, MCP servers, tools, plugins, skill files, libraries, and external services. Each connection carries an assumption that the other side can be trusted, and that assumption may be unwarranted.

Model poisoning and tampering are examples of what can go wrong when trust is inappropriately assumed. An attacker doesn’t necessarily need to compromise the application directly if they can influence a model, tool, dataset, or other dependency that the application trusts. The attacker has a greater chance of success, because the attack is harder to spot with conventional tools and methods.

Concerns with MCP are similar. An agent may depend on an external server to access tools or information, giving that server a role in the application’s behavior. If the server is compromised, the agent can be affected through a connection that looked legitimate when it was set up, leading to data theft or malware installation.

Supply-chain security is the obvious answer to preventing this type of behavior. However, traditional supply-chain security focuses on provenance, vulnerabilities, and whether software originated from a verified source. Those controls remain important, but they don’t necessarily answer what happens after a flawed dependency is brought into the application and begins participating in its activity.

Once the dependency is established, its interactions with the rest of the application can reveal problems that weren’t apparent during the initial assessment. For instance, a trusted tool may suddenly return unexpected data. An LLM may generate a response that triggers a tool call it wouldn’t normally make. An MCP server could appear in a sequence where it hasn’t been used before.

Runtime reveals this behavior through in-line visibility and ongoing monitoring.

Identity Sprawl AI: When Every Agent Creates Another Trust Relationship

Identity sprawl is another consequence of AI’s prevalence.

An enterprise application might have a handful of human users but dozens or hundreds of machine identities. Add agents, connectors, MCP clients, service accounts, tokens, and delegated permissions, and the number of relationships can grow quickly. Access can expand faster than identity or AppSec teams can review it, particularly when identities inherit permissions or pass them from one system to another.

A token may let an agent reach several systems, a connector can inherit a user’s permissions, and an MCP client may invoke tools across multiple services. Each relationship can be legitimate on its own and still grant more access than the person or system actually needs.

Identity controls can establish who or what has access, but they don’t show how that access is used. Consider an agent that normally makes three API calls per day but suddenly makes fifty. Or a service identity that usually retrieves customer records but starts querying administrative endpoints. Though the credentials used in both examples are valid, the anomalous behavior is worth investigating.

Because machine identities operate at a scale and speed that human review cannot match, AppSec teams must follow those identities through their requests and responses. Runtime security can correlate identity, session, and request context across API interactions, exposing anomalous use of otherwise legitimate credentials.

Four Doors, One Path Through the Application

The four areas detailed above can look like separate security problems: AI agent security risks, prompt injection, model supply-chain security, and identity sprawl.

At runtime, they overlap.

An agent calls an API. A prompt influences the decision to make that call. An MCP server supplies the tool. An identity authorizes access. The response feeds the next decision.

Each event looks ordinary on its own; combined into a sequence, the activity can reveal an attack.

Richard Marcus from Optro explained why seeing the full sequence matters. As Optro prepared to launch an MCP server and roll out agents to customers, concerns such as prompt injection, model poisoning or tampering, and sensitive data disclosure became practical questions rather than abstract AI risks. Marcus’ broader point was that teams need to see how customers actually use a product, not just how its designers expect them to use it. Actual behavior can expose relationships and attack paths that a design review misses.

That observation applies well beyond AI. AppSec teams have always had to account for the difference between intended and actual application behavior. AI makes the difference more consequential because the system can interpret input, choose an action, and move across connected services.

The common thread is the request path, and those interactions leave evidence in the requests and responses that flow across it.

Holistic Coverage at Runtime

AppSec teams don’t need four separate tools to look for four avenues of AI risk. They need a way to see how the pieces intersect.

The request path is where those interactions come together. Requests and responses carry the context needed to see the relationship between applications, APIs, agents, MCP services, and the identities that interact with them.

An agent call, a prompt, a tool invocation, an authorization decision, and the response that follows may each look benign in isolation. Viewed as a sequence, they can reveal how an attack moves through the application.

AI changed how existing infrastructure connects and acts, but it didn’t create four separate attack surfaces. The same runtime activity can expose agent behavior, prompt injection, supply-chain issues, and identity misuse. Seeing that activity as it happens gives AppSec teams one place to investigate what would otherwise appear as four disconnected problems.