TL;DR
AI agents combining Large Language Models (LLMs) with traditional software components introduce massive security risks that component-level defenses cannot solve alone. This paper provides the first comprehensive framework systematizing the attack and defense landscape across seven core agent design dimensions, exposing critical gaps in how real-world agents are currently secured.
What Problem Does This Paper Address?
The AI landscape is undergoing a paradigm shift from isolated language models to hybrid, autonomous "agentic" systems. These agents combine the reasoning of LLMs with memory, tools, and direct access to external environments (like web browsers or local file systems) to execute complex tasks autonomously.
While this integration grants unprecedented flexibility, it also creates unique, system-level security vulnerabilities. Traditional software relies on deterministic logic and strict access controls, whereas LLMs are inherently stochastic. When an agent processes untrusted data from the web, that data can double as code or instructions (e.g., indirect prompt injection), hijacking the agent's control flow to exfiltrate data, corrupt files, or execute unauthorized system commands. This survey addresses the lack of a holistic framework to understand, analyze, and mitigate these cross-component security risks.
Methods
The authors present a systematic Systematization of Knowledge (SoK) by reviewing 128 papers (spanning 51 attack methods and 60 defenses) published between 2023 and October 2025. Their methodology consists of three main pillars:
- Agent Design Dimensions: Characterizing agents across seven dimensions of flexibility (Input Trust, Access Sensitivity, Workflow, Action, Memory, Tool, and User Interface).
- Attack Landscape & Taxonomy: Categorizing threats by adversary types (External, User-level, Internal) and defining seven distinct security risk categories (R1 to R7) mapping to the CIA triad (Confidentiality, Integrity, Availability) plus a novel concept called Contextual Security.
- Defense Landscape Systematization: Evaluating existing defense mechanisms (Runtime Protection, Secure-by-Design, IAM, and Component Hardening) and testing their coverage against six real-world open-source agents and five historical AutoGPT CVEs.
Datasets
As a survey and systematization paper, this work does not introduce a new empirical dataset or machine learning benchmark. Instead, it aggregates and synthesizes findings from 128 academic papers and industry vulnerability reports. For its empirical case studies, it evaluates the built-in defenses of six prominent real-world agent frameworks:
- Coding Agents: Codex, Gemini CLI, OpenHands
- Web Agents: Browser Use, Nanobrowser, Skyvern
- Detailed Case Study: 5 distinct real-world CVEs from AutoGPT (ranging from path traversal to OS command injection).
Key Insights and Ideas
- The Flexibility-Security Trade-off: There is a direct correlation between an agent's operational flexibility and its vulnerability. As agents move from rigid, developer-defined workflows to dynamic, LLM-defined workflows with arbitrary tool access, their attack surface expands exponentially.
- Cascading Risk Propagation: Vulnerabilities in agentic systems do not remain isolated. An initial failure at a heterogeneous untrusted interface (R1) propagates into model reasoning risks (R2–R4, like wrong instruction following or hallucinations), which ultimately amplify into severe consequence risks (R5–R7, like private data leakage or environment corruption).
- Downstream Band-Aids vs. Upstream Cures: Most current real-world agent patches focus on mitigating downstream consequences (e.g., making a file system read-only) rather than addressing the upstream root cause (e.g., preventing the indirect prompt injection that triggered the malicious file write command).
Key Results
- Coding Agents Evaluation: Frameworks like OpenHands and Codex successfully implement human-in-the-loop validation and basic sandboxing for dangerous shell commands. However, they completely lack input guardrails to scan workspaces or web-retrieved content for hidden prompt injections.
- Web Agents Evaluation: Web agents are highly fragile. While they attempt to redact credentials using regex-based rules, their input guardrails against indirect prompt injection are mostly limited to basic ad-blocking or simple text delimiters, leaving them highly vulnerable to sophisticated web-based exploits.
- AutoGPT Case Study: The authors' analysis of five AutoGPT CVEs revealed that deployed patches are often brittle. For example, the fix for OS Command Injection (CVE-2024-1881) only validates the first token of a shell command, allowing attackers to easily bypass the check using standard shell chaining operators (like
&∨).
Limitations and Future Work
The authors identify several open challenges and limitations in current agent security research:
- Emergent Misalignment: Layering multiple independent defenses can cause them to conflict. For example, an input sanitizer might accidentally strip out safety formatting or instructions that a downstream guardrail relies on to keep the model secure.
- Fragile Runtime Defenses: Current guardrails suffer from high false-positive and false-negative rates due to the ambiguous boundaries between benign data and malicious instructions.
- Future Directions: The field urgently needs standardized agent identity and access management protocols (similar to OAuth but tailored for autonomous agents), lightweight information flow tracking to prevent "label creep," and realistic evaluation frameworks that bridge academic research with production environments.
Summary updated