Est.

Lateral Movement Risks When AI Agents Access Internal APIs

Compromised agents inherit standing access, turning trusted credentials into attackers' paths.

· 13 min read · Updated
Cover illustration for “Lateral Movement Risks When AI Agents Access Internal APIs”
Threat Intelligence · September 30, 2026 · 13 min read · 2,832 words

AI agents holding broad, authenticated access to internal systems don't just widen the attack surface, they become the lateral movement infrastructure itself. No credential theft required, no malware binary to drop on disk, because the agent already has the keys and already has permission to move. This piece traces the mechanics of how that happens, the structural conditions that make it possible, and the governance layer that can actually contain it.

Why AI agents are structurally different from the service accounts and scripts they replaced

Service accounts used to be boring, and boring was the point. A script ran on a schedule, hit the same endpoints in a fixed order, and did what a human told it to do at commit time. An AI agent doesn't work that way. It decides, at runtime, which APIs to call, in what sequence, and with what data, based on context nobody wrote down in advance. That's the entire value proposition of agentic software, and it's also the entire problem.

Agents don't hold one credential either. A single deployment routinely carries API tokens, OAuth grants, and session cookies across many internal systems simultaneously: email, databases, code repos, cloud APIs, SaaS platforms, all wired into one runtime.

Three identity modes appear under the hood, and they matter because each fails differently. Service principal credentials are long-lived API keys, often shared across multiple agents or environments. One leaked key can unlock several unrelated things at once. Delegated user credentials let an agent act on behalf of a human, inheriting that person's full permission set, so an agent triggered by an over-permissioned employee is over-permissioned by inheritance. Short-lived federated tokens are the emerging fix, scoped and time-boxed, and get their own treatment later in this piece.

The governance data on this is blunt. That gap isn't a future risk to plan around. It's the exposure sitting in the environment right now, today, while most security teams are still writing the policy document neuralcoretech.com.

One mental model matters here: an agent isn't a new kind of endpoint to add to the asset inventory. It's a standing, cross-system access pattern that operates at machine speed, and it doesn't sleep, take lunch, or second-guess itself before hitting send on a request.

The structural conditions that turn agent API access into a lateral movement path

Overprivilege is the root cause, and it's almost always self-inflicted. Standing privilege makes the problem worse: because those tokens are long-lived and always-on, an attacker who takes control of an agent inherits its entire permission set immediately, no escalation step required, no second approval to wait on.

The scale of what a single compromised entry point can reach is not small. Zero Networks' 2026 Lateral Movement Exposure Report, drawing on 54 trillion activities across 312 enterprise environments, found that a single compromised host can reach 85 percent of internal systems on the first hop Zero Networks 2026 Lateral Movement Exposure Report. Agents typically hold broader access than a garden-variety compromised host, so that number only goes up once the compromised asset is an agent instead of a laptop Zero Networks 2026 Lateral Movement Exposure Report.

Flat internal networks don't help. Cloud platforms, Kubernetes clusters, and now AI agents all create dynamic communication patterns that route around the segmentation rules built for a more static network topology. The admin protocols that make internal operations run, RDP, SMB, SSH, WinRM, RPC, cloud APIs, are reachable by agent workloads the same way they're reachable by everything else on the network Top 10 Lateral Movement Risks in Enterprise Networks (and What to Do…. Those numbers describe the network agents are dropped into, not some agent-specific weakness, and that's precisely why an agent with broad reach becomes so dangerous inside it.

Egress traffic gets almost no scrutiny by comparison. Most security programs are built to stop unsolicited traffic coming in, and treat anything an agent sends out as inherently fine, since it's the agent's own request and the agent is trusted. That asymmetry hands an attacker a clean exfiltration channel with a "trusted" label already stamped on it.

Two failure modes compound on top of all this. Credential sprawl: each agent manages its own connection and its own token, with no central place to rotate or revoke anything, so cleanup after an incident means chasing credentials across a dozen disconnected systems. And there's no behavioral baseline: the monitoring tools built for static applications look for known-bad signatures, not for the subtle drift that indicates an agent has started behaving like someone else's agent. None of this is hypothetical. The next section covers exactly how attackers have already put these conditions to use.

How compromise happens: the mechanics of agent-enabled lateral movement

The Promptware Kill Chain research analyzed 36 prominent studies and real-world incidents affecting production LLM systems and identified 21 multi-stage attacks traversing four or more stages, mapping a seven-stage progression: initial access via prompt injection, privilege escalation, reconnaissance, persistence through memory or retrieval poisoning, command and control, and finally lateral movement “Living Off the Agent”: AI Agents as Lateral Movement.

Prompt injection is the front door, and indirect injection is the specific mechanism to understand. The adversarial instruction doesn't come from the user's own prompt. It's buried in a document, a webpage, or a data source the agent processes on someone else's behalf. The ServiceNow Now Assist case from November 2025, disclosed by AppOmni, is the clean example. A low-privilege user's injected instructions manipulated one agent into recruiting a second, more capable peer agent, and that peer then acted using the credentials of the higher-privileged user who had triggered the original request. Peer-to-peer injection is the mechanism here, distinct from the simple user-to-agent story most people picture when they hear "prompt injection." The attacker in that scenario never needed to know a network protocol or write a line of exploit code. Plain language did the work. The skill floor for this kind of attack is dramatically lower than for classic lateral movement.

Supply chain compromise runs as a parallel track. In February 2026, VirusTotal identified malicious OpenClaw AI agent skills distributed as legitimate automation packages, carrying backdoors, droppers, infostealers, and remote access tools inside what looked like helpful plugins.

Mandiant's Shai-Hulud worm case study puts the whole chain together in one incident. A threat actor compromised a SaaS provider, then hijacked an active AI coding assistant session already running on a developer's workstation. The agent wasn't a bystander. It was operating as a trusted interpreter of the developer's intent, and that trust is exactly what made it the vehicle for the attacker's movement through the environment.

Token exfiltration deserves its own line, because it's mechanically simple and almost impossible to catch after the fact. Agents carry OAuth tokens with them as they call external services, and HTTP redirects inside frameworks without strict same-origin policies can shuttle those credentials straight to an attacker-controlled server, automatically. Since the request originated from the agent's own autonomous decision-making, nobody's watching a human click a suspicious link. The leak is invisible by design.

Multi-agent systems add a trust gap nobody built defenses for yet. No established protocol requires an agent to verify where a memory entry or a peer message actually came from, and frameworks that rely on implicit network-layer trust will treat instructions from a compromised peer agent exactly like instructions from a legitimate one. The speed math makes detection-only defense a losing bet regardless. The fastest recorded breakout time in 2025 was 27 seconds, while the average time to identify and contain a breach is 241 days: a ratio of roughly 771,200 to 1 Top 10 Lateral Movement Risks in Enterprise Networks (and What to Do…. By the time most security teams notice anything, the attacker finished the job before lunch. The report opens with the Mandiant/GTIG framing from the September 2026 AI Risk and Resilience Report, noting that attack vectors have evolved from direct chat prompts to indirect prompt injection and AI supply chain compromise, blurring traditional security boundaries. Mandiant/GTIG has tracked UNC6780 (TeamPCP) supply chain compromises, which stole AI service credentials and proprietary AI data and used prompt injection against AI coding assistants and LLM-based security scanners.

Diagram: The Speed Gap: Breakout Time vs. Detection Time. Visualizes: Visualize the catastrophic mismatch between attacker speed and defender response time.

MCP as the protocol that industrializes agent API access, and its specific attack surface

As of December 2025 it was seeing 97 million monthly SDK downloads and now sits under the Linux Foundation's Agentic AI Foundation composio.dev.

The volume moving through MCP is climbing fast across nearly every company that's published numbers. Atlassian logged a 400 percent jump in MCP calls in a single quarter Enterprise MCP Gateway Guide: Governing AI Agents. Figma saw MCP write usage climb 75 percent in one quarter Enterprise MCP Gateway Guide: Governing AI Agents. Salesforce reported sixfold growth in agentic use of its apps through MCP and CLI calls. Anthropic's December 2025 ecosystem update counted more than 10,000 active public MCP servers. Put together, that's a parallel access channel into enterprise systems running alongside human users, largely invisible to the security tooling built to watch humans.

The protocol has its own specific vulnerabilities, and they're not theoretical either. Tool poisoning, first publicly disclosed by Invariant Labs in April 2025, hides adversarial instructions inside tool descriptions and metadata that the agent reads but a human reviewer would likely never think to inspect. Tool permission combinations let an attacker chain together tools that each look harmless in isolation but, combined, exfiltrate data across systems. Lookalike tools can silently swap in for trusted ones, which is a supply chain problem baked into the protocol itself. Every one of them maps directly onto the MCP surface.

The transport layer has its own history. SSE transport was deprecated in the 2025-03-26 MCP specification revision, replaced by streamable HTTP, and streamable HTTP paired with OAuth 2.1 and PKCE is now the supported path for remote production servers. CVE-2025-6514 hit mcp-remote versions 0.0.5 through 0.1.15 before getting patched in v0.1.16. None of this is exotic knowledge; it's just the detail that separates a team that actually reads the spec from one running on vibes.

The protocol also doesn't track its own consumption. MCP has no built-in mechanism for tracking token usage or enforcing spending limits, credential rotation is a manual slog across separate codebases, and an agent can call the same tool over and over with no ceiling anywhere in sight. Help Net Security reported that one runaway agent ran up a $50,000 cloud bill, either a very expensive bug or a preview of what a malicious actor could do on purpose. Layer on shadow MCP, developers spinning up unapproved MCP servers on their own machines, invisible to IT, and the whole thing starts to look like shadow IT wearing a new outfit. Datadog found that MCP tool calls are up 22x, according to the Enterprise MCP Gateway Guide: Governing AI Agents.

Why a governed distribution layer (an MCP gateway) is the structural fix, not just a product category

Connecting agents directly to dozens of individual MCP servers doesn't scale, and it isn't governable once it gets past a handful of connections. Enterprises solved this exact problem once already, for human-facing applications, by building API gateways. The logic transfers cleanly: centralize the chokepoint, don't leave every service to negotiate its own trust relationship.

An MCP gateway sits as a proxy layer between agents and the MCP servers they call, centralizing authentication, enforcing access control, and logging every tool invocation as a single policy enforcement point. Speakeasy is one example, an AI control plane built around an enterprise MCP gateway that gives each agent an identity and enforces security policy on every action. Without one, every agent manages its own connections and its own credentials, and an incident response team trying to revoke access after a compromise is stuck chasing tokens through systems that were never designed to talk to each other. When Cisco announced dedicated MCP security tooling at RSA Conference 2026, that was a signal on its own: when a company with Cisco's network security footprint builds for a protocol at RSA, the category has moved from experimental to enterprise-standard.

A gateway worth the name does a specific list of things for lateral movement, not just authentication in general. It enforces least-privilege tool access scoped to each agent's actual identity, rather than blanket access to every registered server. It screens tool descriptions for injected instructions before the agent ever reads them. It keeps an immutable log of every tool call with the calling agent's identity attached, so an audit doesn't dead-end at "some agent did something." It centralizes credential rotation, so one revocation shuts the door for every dependent agent at once. And it maintains a curated, IT-controlled registry of approved MCP servers, which eliminates shadow MCP instances.

What enterprise teams are deploying today: a comparative look at gateway options

The gateway market has split into a commercial tier and an open-source tier, and each option addresses lateral movement a little differently.

On the commercial side, Lasso takes a security-first approach: reputation scoring for MCP servers, real-time threat detection, and PII leakage prevention through Presidio integration, aimed squarely at prompt injection and sensitive data exposure inside agent-tool interactions. Microsoft runs a dual strategy, an open-source gateway for Azure Kubernetes Service and Azure API Management as an optional managed auth and security layer, both built on Azure Active Directory (Entra ID) for enterprise authentication, which makes it a straightforward fit for organizations already standardized on Microsoft's identity stack. Docker approaches the problem from the runtime layer: container-native isolation, each MCP server running in its own container with resource limits, and cryptographic image signing to address the supply chain angle directly. Palo Alto Networks entered the category through acquisition, announcing intent to acquire Portkey on April 30, 2026 and completing the acquisition on May 29, 2026, bringing a network security pedigree into the AI gateway market. Operant AI pairs gateway functionality with its own research arm, and published the 2026 Guide to Securing MCP, which documents emerging attack patterns including a zero-click exploit class it calls "Shadow Escape".

IBM ContextForge is an IBM-backed open-source option.

Is agent identity tied to a real enterprise identity provider, instead of a shared static key everyone copies into a config file? Does it enforce least-privilege access per agent, instead of an all-or-nothing grant to every registered server? Does it log at the level of the individual tool call, with the calling agent's identity attached, so an investigation has something to actually follow? And can it revoke access centrally on compromise? MCPX (github.com/TheLunarCompany/lunar) covers access control, audit trails, and credential isolation, while full identity provider integration, such as with Okta or Azure AD/SSO, and automated built-in risk scoring for MCP servers require the Enterprise license. The evaluation dimensions that matter for lateral movement containment specifically are that the tool ties agent identity to an enterprise IdP rather than just shared keys, it enforces per-agent least-privilege tool access, it logs at the tool-invocation level with agent identity attached, and it can revoke access centrally on compromise.

Agent identity: why non-human identity governance is the prerequisite the gateway cannot replace

A gateway controls the road. It doesn't decide who gets a passport, and that distinction determines which system controls the actual grant of access versus which one merely governs the road agents travel on. Traditional IAM, IGA, and PAM tooling was designed for slow human login patterns, and cannot govern agents executing high-frequency autonomous actions at machine speed without architectural changes. None of that architecture was built to govern an agent firing off thousands of autonomous actions per hour, and bolting agent support onto those systems without rethinking the architecture that produced this gap doesn't actually solve the problem.

The numbers make clear this is an exposure that exists right now, not an edge case waiting to happen somewhere down the road.

Proper agent identity governance rests on a short list of requirements. Every agent needs its own distinct, registered identity. Every agent needs a named human owner of record and a defined boundary of what it's actually allowed to touch. Credentials need to be short-lived and scoped to the task at hand, not long-lived static API keys sitting in a config file for months. And the whole lifecycle, provisioning, modification, revocation, needs to track the agent's own operational status rather than the fate of whichever employee happened to deploy it first.

Entra Agent ID reached general availability in May 2026, extending Conditional Access, Identity Protection, and Privileged Identity Management to non-human identities. That's the direction the rest of the identity market will have to follow, because a gateway that logs every tool call is only as good as the identity attached to the call it's logging, and right now, for most organizations, that identity is still a shared key nobody's gotten around to rotating. neuralcoretech.com reports that the governance gap is not theoretical: 91% of organizations have AI agents in use, yet only 10% have a formal strategy for managing non-human identities. What the major identity providers now offer is confirmed as of 2026.

Diagram: The Governance Gap: AI Agents Deployed vs. Managed. Visualizes: Visualize the gap between AI agent adoption and formal governance: 91% of organizations have AI agents in use, yet only 10% have a formal strategy for managing non-human…

Sources

  1. Top 10 Lateral Movement Risks in Enterprise Networks (and What to Do About Them)
  2. “Living Off the Agent”: AI Agents as Lateral Movement
  3. Understanding and mitigating the risks of OpenClaw for non-technical users: A practical guide with Skill
  4. The Promptware Kill Chain: How Prompt Injections Gradually Evolved Into a Multistep Malware Delivery Mechanism
  5. The Autonomy Paradigm: AI Agents Are Changing What Lateral Movement Looks Like | Token Security

More in Threat Intelligence