System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspective
Fangzhou Wu, Ethan Cecchetti, Chaowei Xiao
TL;DR
This work tackles indirect prompt injection in LLM-based query processing by introducing the $f$-secure LLM system, a system-level defense that disaggregates the planner and executor and enforces information flow control. It formalizes security guarantees via execution trace non-compromise and ι-execution trace non-compromise, supported by a fine-grained integrity label lattice, a Security Configuration, SEPF, and a Context-Aware Working Pipeline. The authors provide formal analysis and case studies showing robust protection against attacks like InjectAgent while maintaining functionality and efficiency. Empirical results demonstrate near-elimination of execution-trace compromises across diverse models and benchmarks, indicating practical viability for secure, scalable LLM-enabled systems.
Abstract
Large Language Model-based systems (LLM systems) are information and query processing systems that use LLMs to plan operations from natural-language prompts and feed the output of each successive step into the LLM to plan the next. This structure results in powerful tools that can process complex information from diverse sources but raises critical security concerns. Malicious information from any source may be processed by the LLM and can compromise the query processing, resulting in nearly arbitrary misbehavior. To tackle this problem, we present a system-level defense based on the principles of information flow control that we call an f-secure LLM system. An f-secure LLM system disaggregates the components of an LLM system into a context-aware pipeline with dynamically generated structured executable plans, and a security monitor filters out untrusted input into the planning process. This structure prevents compromise while maximizing flexibility. We provide formal models for both existing LLM systems and our f-secure LLM system, allowing analysis of critical security guarantees. We further evaluate case studies and benchmarks showing that f-secure LLM systems provide robust security while preserving functionality and efficiency. Our code is released at https://github.com/fzwark/Secure_LLM_System.
