Nov 09 2026
Security

The AI Security Problem Hiding in the Middle

As organizations become increasingly agentic, they need visibility into what happens between an agent’s instructions and its final output.

The era of experimentation in artificial intelligence is over, and it’s being replaced by the era of the agentic organization. Enterprises are moving beyond simple chatbots and pilots, toward agents that can interact with enterprise systems and code repositories, use tools, automate workflows and take actions on behalf of users.

Organizations are seeking greater productivity and are likely to find it. Yet the shift also creates a security problem that traditional application controls, and even most AI security tools, are not equipped to handle.

In the agentic era, AI will not simply respond to prompts. Agents will write code, access data, call application performance interfaces and even enlist other agents to help complete a task. “They're literally digital employees that don’t just follow instructions but also make judgement calls,” says Sohaib Shaikh, head of AI security go-to-market at Fortinet.

That autonomy introduces risks that can be difficult for organizations to anticipate. An agentic organization may be more efficient in some ways, but its humans may lack visibility into what its agents are doing behind the scenes. An agent might have legitimate permission to access a system but may use that permission in an unexpected or harmful way. Or it could encounter malicious instructions embedded in data it is processing, potentially causing it to disregard its original objective.

DISCOVER: Learn how Fortinet helps businesses respond to an ever-evolving cybersecurity landscape.

The Hugging Face hack that occurred in July was a perfect example of this, Shaikh says: “The prompt wasn’t, ‘Go hack into Hugging Face and then extract credentials and then access information from individuals’ accounts.’ The prompt was, ‘Go solve this math problem.’ And then the agent concluded that the only way to do so was to find its way into an account through what we would consider an unethical or illegal means and then cover its tracks to avoid getting in trouble.”

Find the AI Security Gap Between the Inputs and Outputs

As they build out agentic operations, many enterprise security teams have been focused on monitoring input and output: the instructions given to agents and the agents’ responses. That’s what many of today’s runtime security solutions primarily focus on.

What organizations often don’t see is what happens in between: the tools an agent calls, the Model Context Protocol (MCP) servers it invokes, the searches it conducts, the information it accesses and the actions it takes. The risk has now shifted from what the agent says to what it does. And that’s where things can get messy and dangerous.

The problem stems in part from the way AI systems process information. In traditional computing, instructions and data were clearly separated. Large language models blur that distinction, bringing prompts, files, tool results and other information into the model’s context.

Click on the banner below to learn more about how IT leaders are tackling newer cyber risks.

 

Consider an agent instructed to read a user’s email and deal with messages that don’t require attention. If one of those messages contains a malicious prompt injection, the agent could potentially treat that embedded instruction as part of its own operating context.

“At Fortinet, that’s where we spend a lot of time, catching and blocking everything in between,” Shaikh says. “How can we make sure we can really inspect the actual behavior of the agent in a multiturn way and then understand if it is doing something that’s misaligned, unsafe or against policy? Is it doing something that’s unauthorized or even exhibits malicious intent?”

Fortinet’s FortiAIGate is designed to address that challenge through two complementary capabilities, Shaikh says: real-time runtime guardrails and continuous automated red teaming. FortiAIGate is a self-hosted AI Gateway that stops AI attacks and data leaks across AI agents, applications, MCP servers and large language models — all from one control point. Shaikh describes the guardrails as an “AI firewall” that can inspect prompts, outputs, outgoing tool and API calls, MCP server invocations, and other agent actions, blocking activity that appears harmful, violates policy or is misaligned with an agent’s intended purpose before it executes, with ultralow latency and minimal false positives. The red-teaming capability continuously stress-tests tool-using agents and large language models with thousands of attack simulations to uncover vulnerabilities before they can be exploited.

AI Sprawl Could Grow Out of Control

Organizations also face a more basic problem: They may not know which AI systems are operating in their environments in the first place.

This AI “sprawl,” encompasses employees’ use of personal AI accounts they subscribe to or download, and unapproved tools as well as sanctioned enterprise applications that spawn their own “shadow” agents. Enterprises may not know what these shadow agents are doing or even that they exist. “Every enterprise has agents operating in the dark. The real question isn’t whether they exist — it’s what they’re doing while no one is watching,” Shaikh says.

Fortinet delivers a unified, AI-native approach to this problem through the Fortinet Security Fabric, operating on a common policy framework to provide universal governance and protection.

Whether securing AI usage on endpoints, across the network or within third-party SaaS applications, Fortinet embeds native capabilities directly into solutions such as FortiEndpoint, FortiSASE, FortiCASB and FortiGate to uncover and block shadow AI risks across the entire IT footprint.

That makes visibility and enforcement essential. Organizations need to understand what AI tools and agents are operating in their environments, determine what they're permitted to access and establish controls that can monitor their behavior and shut down anything unauthorized, unsafe or against policy.

Because the biggest risk is not in the instruction an organization gives an AI agent, or even the answer it produces — it is everything the agent does in between.

Brought to you by:

South_agency/Getty Images
Close

New Research from CDW Explores AI and Cybersecurity

Learn how AI is helping IT teams manage risk and improve resilience.