A Framework for Formalizing LLM Agent Security
On the map: LLM agents and tool use → Agent threats, guardrails and governance
also in 1 more
Abstract (arXiv)
Security in LLM agents is inherently contextual. For example, the same action taken by an agent may represent legitimate behavior or a security violation depending on whose instruction led to the action, what objective is being pursued, and whether the action serves that objective. However, existing definitions of security attacks against LLM agents often fail to capture this contextual nature. As a result, defenses face a fundamental utility-security tradeoff: applying defenses uniformly across all contexts can lead to significant utility loss, while applying defenses in insufficient or inappropriate contexts can result in security vulnerabilities. In this work, we present a framework that systematizes existing attacks and defenses from the perspective of contextual security. To this end, we propose four security properties that capture contextual security for LLM agents: task alignment (pursuing authorized objectives), action alignment (individual actions serving those objectives), source authorization (executing commands from authenticated sources), and data isolation (ensuring information flows respect privilege boundaries). We further introduce a set of oracle functions that enable verification of whether these security properties are violated as an agent executes a user task. Using this framework, we reformalize existing attacks, such as indirect prompt injection, direct prompt injection, jailbreak, task drift, and memory poisoning, as violations of one or more security properties, thereby providing precise and contextual definitions of these attacks. Similarly, we reformalize defenses as mechanisms that strengthen oracle functions or perform security property checks. Finally, we discuss several important future research directions enabled by our framework.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 87 of its 112 references that are in the map. First posted on arXiv 19 Mar 2026.
Builds on
87 of 112 references.
Closest ancestors · 32
Same direction, newest first
- 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents3 Feb
- 2026AgenTRIM: Tool Risk Mitigation for Agentic AI18 Jan
- 2026Taming Various Privilege Escalation in LLM-Based Agent Systems: A Mandatory Access Control Framework17 Jan
- 2025MemoryGraft: Persistent Compromise of LLM Agents via Poisoned Experience Retrieval18 Dec
- 2025ObliInjection: Order-Oblivious Prompt Injection Attack to LLM Agents with Multi-source Data10 Dec
- 2025PropensityBench: Evaluating Latent Safety Risks in Large Language Models via an Agentic Approach24 Nov
- 2025Identity Management for Agentic AI: The new frontier of authorization, authentication, and security for an AI agent world29 Oct
- 2025WAInjectBench: Benchmarking Prompt Injection Detections for Web Agents1 Oct
- 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agents21 Aug
- 2025ProbGuard: Proactive Runtime Monitoring for LLM Agent Safety via Probabilistic Prediction1 Aug
- 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows29 Jun
20 more
- 2025DRIFT: Dynamic Rule-Based Defense with Injection Isolation for Securing LLM Agents13 Jun
- 2025WebInject: Prompt Injection Attack to Web Agents16 May
- 2025AgentVigil: Generic Black-Box Red-teaming for Indirect Prompt Injection against LLM Agents9 May
- 2025Prompt Injection Attack to Tool Selection in LLM Agents28 Apr
- 2025WASP: Benchmarking Web Agent Security Against Prompt Injection Attacks22 Apr
- 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoning26 Mar
- 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agents24 Mar
- 2025Prompt Flow Integrity to Prevent Privilege Escalation in LLM Agents17 Mar
- 2025Memory Injection Attacks on LLM Agents via Query-Only Interaction5 Mar
- 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
- 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
- 2024Imprompter: Tricking LLM Agents into Improper Tool Use19 Oct
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024Breaking Agents: Compromising Autonomous LLM Agents Through Malfunction Amplification30 Jul
- 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases17 Jul
- 2024AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents19 Jun
- 2024Dissecting Adversarial Robustness of Multimodal LM Agents18 Jun
- 2024IsolateGPT: An Execution Isolation Architecture for LLM-Based Agentic Systems8 Mar
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
- 2023Identifying the Risks of LM Agents with an LM-Emulated Sandbox25 Sep
Other references · 55
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
- 2019Attention is not Explanationcited by 916
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2022Improving alignment of dialogue agents via targeted human judgementscited by 527
38 more
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 439
- 2018Scalable agent alignment via reward modeling: a research directioncited by 438
- 2023NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Railscited by 347
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
- 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
- 2021Measuring Attribution in Natural Language Generation Modelscited by 253
- 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Modelscited by 251
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlightingcited by 233
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
- 2024SecAlign: Defending Against Prompt Injection with Preference Optimizationcited by 179
- 2025Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teamingcited by 172
- 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attackscited by 124
- 2024Optimization-based Prompt Injection Attack to LLM-as-a-Judgecited by 123
- 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 113
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Modelscited by 112
- 2024System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspectivecited by 91
- 2024A New Era in LLM Security: Exploring Security Concerns in Real-World LLM-based Systemscited by 74
- 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchycited by 62
- 2024Get my drift? Catching LLM Task Drift with Activation Deltascited by 61
- 2024Robust LLM safeguarding via refusal feature adversarial trainingcited by 60
- 2024Current state of LLM Risks and AI Guardrailscited by 44
- 2025PromptShield: Deployable Detection for Prompt Injection Attackscited by 43
- 2025Can Indirect Prompt Injection Attacks Be Detected and Removed?cited by 43
- 2024R2-Guard: Robust Reasoning Enabled LLM Guardrail via Knowledge-Enhanced Logical Reasoningcited by 41
- 2023Misusing Tools in Large Language Models With Visual Adversarial Examplescited by 40
- 2024Formal-LLM: Integrating Formal Language and Natural Language for Controllable LLM-based Agentscited by 39
- 2024SafeWatch: An Efficient Safety-Policy Following Video Guardrail Model with Transparent Explanationscited by 37
- 2023SALLM: Security Assessment of Generated Codecited by 35
- 2025A Critical Evaluation of Defenses against Prompt Injection Attackscited by 31
- 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
- 2024ConfusedPilot: Confused Deputy Risks in RAG-based LLMscited by 22
- 2025VeriSafe Agent: Safeguarding Mobile GUI Agent via Logic-based Action Verificationcited by 20
- 2025AudioJailbreak: Jailbreak Attacks against End-to-End Large Audio-Language Modelscited by 16
- 2025COSMIC: Generalized Refusal Direction Identification in LLM Activationscited by 15
50 most cited of 55 All 55 (JSON)
Built on by
Citing papers per year: 2026: 16.
16 papers.
Sort:
By area:
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluationcited by 5
- 2026Securing LLM Agents Need Intent-to-Execution Integritycited by 2
- 2026Agent Security Needs Redefinition through a Holistic Frameworkcited by 2
- 2026Sema Code: Decoupling AI Coding Agents into Programmable, Embeddable Infrastructurecited by 1
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
- 2026CAGE: Certified Authorization under Typed-Return Uncertainty for Tool-Using Agentscited by 1
- 2026CliniCARE-Bench: Clinical Calibrated Audit of Medical Reasoning in EHRcited by 1
- 2026Chain-of-Authorization: Embedding authorization into large language modelscited by 0
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agentscited by 0
- 2026CyberLLM: A Multi-Agent LLM Framework for Autonomous Detection and Guarded Response in Automotive Cybersecuritycited by 0
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistantscited by 0
- 2026Reassembling Distributed Risk: Trajectory-Conditioned Action Generation for Multi-Turn Agent Safetycited by 0
4 more
- 2026The Guard That Cried Wolf: How Scary Words Make Agent Guardrails Refuse Legitimate Actionscited by 0
- 2026IBBench-Light: A Paired Evaluation of Task-Conditioned Responses to External Directivescited by 0
- 2026A Proposal for an Agentic AI Architecture to Support Multi-Domain Decision-Making in the Brazilian Armed Forcescited by 0
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Controlcited by 0
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Control29 Sep 2026
- 2026A Proposal for an Agentic AI Architecture to Support Multi-Domain Decision-Making in the Brazilian Armed Forces17 Sep 2026
- 2026IBBench-Light: A Paired Evaluation of Task-Conditioned Responses to External Directives12 Sep 2026
- 2026The Guard That Cried Wolf: How Scary Words Make Agent Guardrails Refuse Legitimate Actions27 Aug 2026
- 2026Reassembling Distributed Risk: Trajectory-Conditioned Action Generation for Multi-Turn Agent Safety26 Aug 2026
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistants14 Aug 2026
- 2026CliniCARE-Bench: Clinical Calibrated Audit of Medical Reasoning in EHR7 Aug 2026
- 2026CyberLLM: A Multi-Agent LLM Framework for Autonomous Detection and Guarded Response in Automotive Cybersecurity6 Aug 2026
- 2026CAGE: Certified Authorization under Typed-Return Uncertainty for Tool-Using Agents31 Jul 2026
- 2026Agent Security Needs Redefinition through a Holistic Framework24 Jul 2026
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directions14 Jul 2026
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluation9 Jun 2026
4 more
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agents4 Jun 2026
- 2026Securing LLM Agents Need Intent-to-Execution Integrity16 May 2026
- 2026Sema Code: Decoupling AI Coding Agents into Programmable, Embeddable Infrastructure13 Apr 2026
- 2026Chain-of-Authorization: Embedding authorization into large language models24 Mar 2026
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluationcited by 5
- 2026Securing LLM Agents Need Intent-to-Execution Integritycited by 2
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
- 2026CAGE: Certified Authorization under Typed-Return Uncertainty for Tool-Using Agentscited by 1
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agentscited by 0
- 2026CyberLLM: A Multi-Agent LLM Framework for Autonomous Detection and Guarded Response in Automotive Cybersecuritycited by 0
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistantscited by 0
- 2026Reassembling Distributed Risk: Trajectory-Conditioned Action Generation for Multi-Turn Agent Safetycited by 0
- 2026The Guard That Cried Wolf: How Scary Words Make Agent Guardrails Refuse Legitimate Actionscited by 0
- 2026A Proposal for an Agentic AI Architecture to Support Multi-Domain Decision-Making in the Brazilian Armed Forcescited by 0
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Controlcited by 0
- 2026HARDE: Optimizing Agent Harnesses for Runtime Risk Detection and Execution Control29 Sep 2026
- 2026A Proposal for an Agentic AI Architecture to Support Multi-Domain Decision-Making in the Brazilian Armed Forces17 Sep 2026
- 2026The Guard That Cried Wolf: How Scary Words Make Agent Guardrails Refuse Legitimate Actions27 Aug 2026
- 2026Reassembling Distributed Risk: Trajectory-Conditioned Action Generation for Multi-Turn Agent Safety26 Aug 2026
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistants14 Aug 2026
- 2026CyberLLM: A Multi-Agent LLM Framework for Autonomous Detection and Guarded Response in Automotive Cybersecurity6 Aug 2026
- 2026CAGE: Certified Authorization under Typed-Return Uncertainty for Tool-Using Agents31 Jul 2026
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directions14 Jul 2026
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluation9 Jun 2026
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agents4 Jun 2026
- 2026Securing LLM Agents Need Intent-to-Execution Integrity16 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025LLM Agents Should Employ Security Principles
- 2026ARGUS: Defending LLM Agents Against Context-Aware Prompt Injection
- 2026ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools
- 2025LLMZ+: Contextual Prompt Whitelist Principles for Agentic LLMs
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis
- 2026Architecting Secure AI Agents: Perspectives on System-Level Defenses Against Indirect Prompt Injection Attacks
- 2025Commercial LLM Agents Are Already Vulnerable to Simple Yet Dangerous Attacks
- 2026Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks