Definition · AI security
Attack surface
An attack surface is the set of points where an attacker can try to go into a system, change it, or get data out. In an AI system, the surface also includes the prompts, the content that the model reads, the tools, the permissions and the memory. A larger surface gives an attacker more points to try.
Last reviewed
Key points
- NIST defines the attack surface as the points where an attacker can try to go into a system, change it, or get data out.
- AI agents add new points. Web pages, emails, tools, memory and MCP servers are all part of the surface.
- A larger attack surface makes a system less safe.
- Fewer tools, fewer permissions and less untrusted input make the surface smaller. They do not remove the risk.
What an attack surface includes
OWASP divides the surface into four parts:
- Paths for data and commands, in and out.
- The code that protects these paths.
- Valuable data, with secrets and keys.
- The code that protects that data.
The surface grows “as you add more interfaces and user types” (OWASP).
What AI adds to the attack surface
A language model gets data and instructions in the same text. Greshake and colleagues wrote in 2023 that LLM applications “blur the line between data and instructions”.
| New point | Attack |
|---|---|
| Prompts | Prompt injection |
| Web pages, emails | Indirect prompt injection |
| Tools | Tool misuse |
| Memory | Agent memory poisoning |
| Third-party parts | AI supply chain compromise |
Why the attack surface is important
A 2008 Carnegie Mellon thesis by Pratyusa Manadhata says: “The larger the attack surface, the more insecure the system.”
Simon Willison names three parts that together let an attacker steal data, the lethal trifecta (June 2025):
- access to private data
- exposure to untrusted content
- external communication
With all three, one web page can tell the agent to send your data out.
In practice
These 6 steps make an AI attack surface smaller. Each step removes points of attack. No step alone makes an agent safe.
- Give fewer tools. OWASP LLM06:2025 tells you to limit the extensions of an agent “to only the minimum necessary”. This step decreases excessive agency.
- Give fewer rights. Apply least privilege to each tool. Use read-only access where possible. Do not give wildcard permissions.
- Keep token scopes small. The MCP security best practices say that a stolen broad token gives an “expanded blast radius”.
- Isolate local MCP servers. These servers operate with the privileges of the client. Put them in a sandbox “with minimal default privileges”.
- Break the dangerous set of three. The Agents Rule of Two from Meta (October 2025) permits at most two of these in one session:
- untrustworthy input
- access to sensitive systems or private data
- changes to systems, or external communication
- Limit the access of the agent. OpenAI said in December 2025 that agent mode in ChatGPT Atlas “expands the security threat surface”. OpenAI tells users of ChatGPT Atlas to “limit logged-in access when possible”.
The general rules also apply. OWASP tells you to stop features and interfaces that you do not use. Do not keep confidential data that the system does not use.
Questions and answers
What is the attack surface of an AI agent?
All the points where an attacker can send data to the agent or use the agent. OpenAI says that agent mode in ChatGPT Atlas "expands the security threat surface".
How do you make the attack surface of an AI agent smaller?
Remove what the agent does not use. Give the minimum tools, permissions and token scopes. Put local MCP servers in a sandbox.
Sources
- NIST CSRC Glossary: attack surfaceNIST
- Attack Surface Analysis Cheat SheetOWASP
- An Attack Surface Metric (PhD thesis, advisor Jeannette M. Wing)Carnegie Mellon University, Dec 2008
- Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt InjectionarXiv (Greshake et al.), 5 May 2023
- Continuously hardening ChatGPT Atlas against prompt injectionOpenAI, 22 Dec 2025
- LLM06:2025 Excessive AgencyOWASP GenAI Security Project
- AI Agent Security Cheat SheetOWASP
- Model Context Protocol specification, Security Best PracticesModel Context Protocol
- The lethal trifecta for AI agents: private data, untrusted content, and external communicationSimon Willison, 16 Jun 2025
- Agents Rule of Two: A Practical Approach to AI Agent SecurityMeta AI, 31 Oct 2025