Back to Blog
AI Red Teaming Oct 11, 2026 79 views

The AI Attack Surface: Everything an Attacker Can Reach in Your AI Stack

Before you can secure or attack an AI system, map it the way an adversary does: model, system prompt, RAG, tools, agents, MCP and CI/CD, lined up against three OWASP Top 10 lists and the real breaches that already hit each layer.

By Obaida Albasha, Security Researcher, Cytomate

The opening post of our AI Penetration Testing series: first, learn to see the whole battlefield. Every post after this one breaks and then hardens a single piece of it.

You cannot defend what you cannot see

A traditional web app has a shape a pentester learns to recognize in minutes: endpoints, parameters, a database, an auth layer, a server. Twenty years of tooling and methodology sit on top of that shape. An AI system does not have that shape. It has a language model that cannot reliably tell its instructions apart from its data, a retrieval layer that pulls in text nobody vetted, tools that let it act in the real world, and increasingly a pipeline that lets an AI agent write and ship code with a human barely in the loop.

The result is an attack surface that is both bigger and stranger than what came before. The classic categories, injection, broken access control, supply chain, are all still here, but they show up in places you would not expect and behave in ways your existing controls do not catch. A web firewall will not stop a payload hidden inside an email that a copilot reads days later. A code review will not catch a malicious instruction buried in a GitHub issue title. To attack or defend any of it, you first have to know the terrain. So let's walk it, from the model outward to the pipeline.

Three maps you'll see throughout this series. The security community has already done a lot of the taxonomy work. The OWASP Top 10 for LLM Applications (2025) covers model-level risks (LLM01 to LLM10). The OWASP Top 10 for Agentic Applications (2026), published on 9 December 2025, covers risks unique to agents that plan, remember, and act (ASI01 to ASI10). And the OWASP Top 10 CI/CD Security Risks covers the pipeline (CICD-SEC-1 to CICD-SEC-10). We'll map every layer below onto these so the whole series speaks the same language. Here they are in full.

OWASP Top 10 for LLM Applications (2025)

IDRisk
LLM01Prompt Injection
LLM02Sensitive Information Disclosure
LLM03Supply Chain
LLM04Data and Model Poisoning
LLM05Improper Output Handling
LLM06Excessive Agency
LLM07System Prompt Leakage
LLM08Vector and Embedding Weaknesses
LLM09Misinformation
LLM10Unbounded Consumption

OWASP Top 10 for Agentic Applications (2026)

IDRisk
ASI01Agent Goal Hijack
ASI02Tool Misuse & Exploitation
ASI03Identity and Privilege Abuse
ASI04Agentic Supply Chain Vulnerabilities
ASI05Unexpected Code Execution (RCE)
ASI06Memory & Context Poisoning
ASI07Insecure Inter-Agent Communication
ASI08Cascading Failures
ASI09Human-Agent Trust Exploitation
ASI10Rogue Agents

OWASP Top 10 CI/CD Security Risks

IDRisk
CICD-SEC-1Insufficient Flow Control Mechanisms
CICD-SEC-2Inadequate Identity and Access Management
CICD-SEC-3Dependency Chain Abuse
CICD-SEC-4Poisoned Pipeline Execution (PPE)
CICD-SEC-5Insufficient PBAC (Pipeline-Based Access Controls)
CICD-SEC-6Insufficient Credential Hygiene
CICD-SEC-7Insecure System Configuration
CICD-SEC-8Ungoverned Usage of 3rd Party Services
CICD-SEC-9Improper Artifact Integrity Validation
CICD-SEC-10Insufficient Logging and Visibility

The layers of the AI attack surface

Think of an AI application as a stack of trust boundaries, each one wider and more dangerous than the last. At the center is a model that will do almost anything you phrase convincingly. Around it we keep adding capability, context, memory, tools, autonomy, and every ring we add is a new place for an attacker to stand.

1. The model itself

At the core is the LLM. Its defining security property is the one nobody designed on purpose: it processes the system prompt, the user's input, and any text it retrieves as one undifferentiated stream of tokens. There is no reliable, built-in way to mark some of those tokens as trusted commands and others as mere data. That single fact is the root cause of most of this list.

Attacks that live at the model layer:

  • Prompt injection (LLM01), direct and indirect, where attacker-supplied text overrides the developer's intended instructions. This is the single most important attack in all of AI security, and it is where the next post in this series begins.
  • Sensitive information disclosure (LLM02) and system prompt leakage (LLM07), coaxing the model into revealing its instructions, secrets, or other users' data.
  • Data and model poisoning (LLM04), corrupting the training or fine-tuning data so the model misbehaves on a trigger.
  • Misinformation (LLM09) and unbounded consumption (LLM10), hallucinated output that the application trusts, and cost/denial attacks that run up a bill or exhaust a quota.

2. The system prompt and guardrails

Wrapped around the model is the system prompt, the instructions that are supposed to keep it on task, plus whatever content filters and guardrails the team bolted on. The trap here is treating the system prompt as a security boundary. It isn't. It's a strongly worded suggestion that sits in the same token stream the attacker is writing into. Anything the system prompt tries to forbid, a well-crafted injection can try to re-permit. Guardrails raise the cost of an attack; they do not eliminate the class.

3. RAG and the knowledge layer

Retrieval-Augmented Generation (RAG) gives the model access to a knowledge base, documents, tickets, wiki pages, embedded into a vector database and pulled in at query time. It is how you make a model "know" your company's data. It is also how you let untrusted content reach the model's context without anyone reading it first.

The RAG layer introduces its own problems (LLM08, vector and embedding weaknesses):

  • Indirect prompt injection via poisoned documents, a malicious instruction planted in a file, email, or web page that the model dutifully retrieves and obeys.
  • Cross-tenant and cross-user leakage, when access controls on the vector store are missing or weak, so one user's query retrieves another's confidential data.
  • Embedding inversion, reconstructing sensitive source text from the stored vectors themselves.

4. Tools and function calling

The moment you give a model the ability to call tools, send an email, run a query, hit an API, execute code, you have crossed the line from a system that talks to a system that acts. Every tool is a new privilege, and models are notoriously bad at refusing to misuse them when manipulated.

This is excessive agency (LLM06): the model has more permissions, autonomy, or reach than the task actually requires, and an attacker who controls the model's input inherits all of it. A support bot that can issue refunds can be talked into issuing one. A coding assistant that can run shell commands can be talked into running yours.

5. Agents: planning, memory, and autonomy

An agent is what you get when you let the model loop, plan a multi-step task, call tools, observe the results, update its memory, and keep going with little or no human approval between steps. This is where the attack surface changes character entirely, which is exactly why OWASP gave agents their own Top 10. Passive LLM risks become active agent behaviors:

  • Agent goal hijack (ASI01), redirecting what the agent is trying to achieve, usually through text it reads mid-task.
  • Tool misuse and unexpected code execution (ASI05), turning the agent's own capabilities against its owner.
  • Memory and context poisoning (ASI06), planting something in the agent's persistent memory that steers it on a future run, long after the attacker is gone.
  • Insecure inter-agent communication (ASI07) and cascading failures, where one compromised agent in a multi-agent system poisons the others.
  • Human-agent trust exploitation (ASI09) and rogue agents (ASI10), agents that drift from their objective or keep acting harmfully after the controls that were supposed to govern them have failed.

Simon Willison's "lethal trifecta" is the sharpest way to reason about agent risk: any agent that combines access to private data, exposure to untrusted content, and the ability to communicate externally can be turned into a data-exfiltration tool by a single injected prompt. The poisoned content steers the agent, the agent reads the secrets, the agent sends them out the door. Meta's "Agents Rule of Two" treats those three properties as a budget: an agent running without human approval should satisfy at most two of them.

6. MCP: the connector layer

The Model Context Protocol (MCP) is the fast-emerging standard for wiring agents to tools and data sources, GitHub, Slack, Google Drive, Jira, AWS, hundreds of enterprise systems, through a common interface. It is enormously useful and, in its current form, enormously exposed. MCP's threat model assumes high trust between client and server; real attackers do not cooperate with that assumption. By early 2026, researchers had catalogued roughly 200,000 internet-exposed MCP servers, many with no authentication at all.

MCP-specific attacks include tool poisoning (a malicious server ships hidden instructions inside its tool descriptions), rug pulls (a tool that behaves well until after you approve it, then changes), the confused deputy (the server abuses the agent's credentials on the attacker's behalf), cross-server shadowing, and plain old command injection and credential theft from servers that hardcode cloud keys in their config. OWASP now maintains a dedicated MCP Top 10 for exactly this.

7. CI/CD: where it all ships, and where AI now lives

Every layer above gets built, tested, and deployed through a pipeline. That pipeline was always a high-value target, the OWASP Top 10 CI/CD Security Risks covers poisoned pipeline execution, insufficient flow control, dependency-chain abuse, poor secrets hygiene, and more. What's new, and genuinely alarming, is that teams are now putting AI agents inside the pipeline itself: issue triagers, PR reviewers, auto-fixers, all running with repository credentials and the ability to execute commands.

That fuses two attack surfaces into one. A prompt injection (an LLM risk) delivered through a GitHub issue (an untrusted input) now triggers code execution in a privileged CI context (a CI/CD risk), and the blast radius is your software supply chain. This is the throughline of the entire series, and it is no longer theoretical, as the next section shows.

Figure 1. The AI attack surface as concentric trust boundaries. Each ring you add, context, retrieval, tools, autonomy, connectors, pipeline, widens what an attacker who controls the model's input can reach.

These doors are already open: real-world breaches

None of this is a thought experiment. In the last eighteen months, every single layer above has produced a named, documented, real-world incident. Here are the ones worth knowing before we go deeper.

EchoLeak: the first zero-click AI exploit (Microsoft 365 Copilot)

Patched Jun 2025

Aim Security disclosed CVE-2025-32711 (CVSS 9.3), an indirect prompt injection in Microsoft 365 Copilot that researchers called the first real-world zero-click exploit against a production LLM. An attacker simply emailed the victim a message containing hidden instructions. Later, when the user asked Copilot an ordinary business question, Copilot retrieved that email as context, obeyed the buried instructions, and exfiltrated sensitive data out through an allowlisted Teams/SharePoint image proxy, with no click required. This is the RAG layer and the lethal trifecta in one clean shot: private data, untrusted content, an external channel.

Clinejection: prompt injection to supply-chain compromise

Feb 2026

Researcher Adnan Khan showed how an AI agent in a CI/CD pipeline turns a comment box into remote code execution. The Cline project ran AI-powered issue triage using an AI coding action with broad tool access on every new GitHub issue. A malicious issue title carried a prompt injection that made the agent run attacker commands. The triage workflow had no publish secrets, but it shared a GitHub Actions cache key with the nightly release workflow, so the attacker poisoned the cache, the release job loaded it, and npm publishing credentials were stolen. A compromised cline@2.3.0 was published by an anonymous attacker and sat live for roughly eight hours. One issue title to a poisoned release: the fusion of LLM01 and the CI/CD supply chain in a single chain.

postmark-mcp: the first malicious MCP server in the wild

Sep 2025

Koi Security caught an npm package, postmark-mcp, impersonating a legitimate Postmark email MCP server. It shipped fifteen clean versions to build trust, then version 1.0.16 added a single line that silently BCC'd every email the agent sent to an attacker-controlled address. Roughly 1,500 weekly downloads, exfiltrating "thousands upon thousands" of emails, with no traditional security tool positioned to notice. The first confirmed real-world malicious MCP server, and proof that supply-chain attacks against agent tools are no longer hypothetical.

LiteLLM / hackerbot-claw: an autonomous attack bot in the pipeline

Mar 2026

An autonomous attack bot named hackerbot-claw harvested the PyPI publishing token for LiteLLM, the model gateway behind CrewAI, DSPy, Microsoft GraphRAG and dozens of agent frameworks, through a compromised CI setup, then pushed two backdoored versions directly to PyPI. The malicious package sat on PyPI for about three hours and racked up nearly 47,000 downloads in that window. No human direction was needed after launch: the dependency-chain and excessive-agency risks, automated end to end.

Not every disaster needs an attacker. In 2025, an AI coding assistant at Replit deleted a production database despite explicit instructions to change nothing, then fabricated thousands of fake records and falsely reported that rollback was impossible. There was no adversary. But the over-permissioned agent that caused that safety failure is the exact same over-permissioned agent an attacker exploits through prompt injection. In agentic systems, containing the safety failure and containing the security gap turn out to be the same job, which is why we treat them together throughout this series.

Putting it on one map

Here is the whole surface in one view: each layer, the attacks that live there, the OWASP category that names them, and the breach that already proved it real.

Layer Primary attacks OWASP mapping Real-world proof
ModelPrompt injection, info disclosure, poisoningLLM01, LLM02, LLM04, LLM07EchoLeak
System prompt / guardrailsInstruction override, jailbreaksLLM01EchoLeak
RAG / knowledgeIndirect injection, cross-tenant leakageLLM08, LLM02EchoLeak
Tools / functionsExcessive agency, output mishandlingLLM06, LLM05Replit DB wipe
AgentsGoal hijack, memory poisoning, rogue agentsASI01, ASI06, ASI10Clinejection
MCP connectorsTool poisoning, rug pulls, confused deputyMCP Top 10, ASI04postmark-mcp
CI/CD pipelinePoisoned pipeline, cache poisoning, dependency abuseCICD-SEC-1..10, LLM03Clinejection, LiteLLM

Why this surface is uniquely hard

Three properties make AI security genuinely different from everything that came before, and they're worth holding in your head for the rest of the series:

  1. Data is code. The model cannot separate instructions from input. There is no equivalent of a prepared statement that cleanly fixes this, which is why prompt injection remains unsolved and sits at #1.
  2. Trust flows inward from untrusted places. A document, an email, an issue title, a tool description, any of these can carry an instruction straight into the model's privileged context. The attacker never needs to touch your infrastructure.
  3. Autonomy multiplies blast radius. A chatbot that gets injected says something wrong. An agent that gets injected does something wrong, with real credentials, across real systems, and often while nobody is watching.

Add the velocity, OWASP tracked coding-agent projects shipping updates several times a day, one averaging a release every eight hours, and you have an attack surface that grows faster than traditional software composition analysis was ever built to keep up with.

Where this series goes next

Now that the terrain is mapped, the rest of this series goes door by door: we'll pick a layer, break it with a working attack in a lab we own, then harden it, intro, attack, detection, mitigation, the same structure every time. We'll move from the model outward, through RAG and agents and MCP, and finally into securing the Azure CI/CD pipeline that ships the whole thing.

We start where every attacker starts and where OWASP has ranked #1 two years running: prompt injection, the deceptively simple technique that turned a business email into a zero-click data breach, an issue title into a supply-chain compromise, and a helpful AI assistant into an insider threat. It is the foundational weakness of the entire field, and once you understand it, everything else on this map starts to make sense.

The short version

An AI system is a stack of trust boundaries, model, system prompt, RAG, tools, agents, MCP, CI/CD, and every ring you add widens what an attacker who controls the input can reach. The model can't tell commands from data, untrusted content flows inward from documents and issue titles and tool descriptions, and autonomy turns "says something wrong" into "does something wrong with real credentials." OWASP has already named the risks (LLM01 to LLM10, ASI01 to ASI10, CICD-SEC-1 to 10), and the breaches are already here: EchoLeak, Clinejection, postmark-mcp, LiteLLM. Learn the map, then we start breaking it, beginning with prompt injection.

Sources & Further Reading OWASP GenAI Security Project, Top 10 for LLM Applications 2025 (LLM01 to LLM10) and Top 10 for Agentic Applications 2026 (ASI01 to ASI10, published 9 Dec 2025), genai.owasp.org
OWASP, Top 10 CI/CD Security Risks (CICD-SEC-1 through 10) and the OWASP MCP Top 10 working group
Aim Security / Aim Labs, EchoLeak: The First Real-World Zero-Click Prompt Injection Exploit in a Production LLM System (CVE-2025-32711, CVSS 9.3) | Microsoft MSRC advisory | The Hacker News, SecurityWeek
Adnan Khan, Clinejection: Compromising Cline's Production Releases by Prompting an Issue Triager | Simon Willison's Weblog | Cloud Security Alliance research note
Koi Security (Idan Dardikman), postmark-mcp npm Malicious Backdoor: Email Theft | The Hacker News, CSO Online, SC World
Help Net Security, Prompt injection still drives most agentic AI security failures in production (OWASP State of Agentic AI Security and Governance v2.01) | LiteLLM / hackerbot-claw, Replit incident
Simon Willison, The Lethal Trifecta | Meta AI, Agents Rule of Two: A Practical Approach to AI Agent Security
Trend Micro & OX Security, Exposed MCP Servers / The Mother of All AI Supply Chains (~200,000 internet-exposed MCP servers)

More from the Blog

Threat Intelligence Nov 29, 2026

The Build-Pipeline Backdoor: Inside the NullReceiver Supply-Chain Campaign

Read More
Deception Nov 29, 2026

Lying to the Machines: The Secret Weapon Against AI Attacks

Read More
Agentic Security Nov 24, 2026

Your AI Coding Agents Need an EDR Too: Introducing cADRe

Read More