A New Era in LLM Security: Exploring Security Concerns in Real-World LLM-based Systems

Fangzhou Wu, Ning Zhang, Somesh Jha, Patrick D. McDaniel, Chaowei XiaoarXiv 2024 · DOI

Abstract

Current security research on Large Language Models (LLMs) predominantly focuses on standalone models, overlooking the complex ecosystems in which they are deployed. This paper introduces a systematic methodology to analyze "compositional" LLM systems—integrations involving plugins, sandboxes, and frontends. By modeling these systems through Information Flow Analysis, the authors identify critical vulnerabilities arising from the interaction between probabilistic model outputs and deterministic system components. The research demonstrates a high-impact, stealthy end-to-end attack that leverages indirect prompt injection to exfiltrate sensitive user data, such as chat history, with a 100% success rate across popular GPT-4 plugins.

Introduction

Most security research on Large Language Models (LLMs) treats them as isolated black boxes, focusing on "jailbreaking" the model itself or preventing it from leaking training data. However, in real-world applications, LLMs like GPT-4 operate as part of a complex ecosystem. They interact with web-browsing tools, execute code in sandboxes, and render content through a web frontend.

This integration creates a massive, under-studied attack surface. Because LLMs are probabilistic—meaning they interpret instructions with a degree of uncertainty—traditional deterministic security rules are difficult to enforce. The authors address the lack of a systematic methodology to analyze the security of these integrated LLM systems, shifting the focus from the model to the entire compositional system.

Methodology

The researchers propose a new framework based on Information Flow Analysis. They model the LLM system as a collection of "objects" (the model, plugins, frontend, etc.) and define two primary types of information movement:

  1. Actions: Internal processing within a single object (e.g., the LLM generating text).
  2. Interactions: Data transmission between two objects (e.g., the LLM sending a URL to the frontend).
Figure 1: Framework for analyzing compositional LLM systems through information flow, actions, and interactions.

The analysis follows a three-step process: identifying where a constraint should exist, verifying if it actually exists, and testing its robustness against adversarial tactics like indirect prompt injection.

Vulnerability Analysis

The study reveals several key insights into the security of compositional systems:

  • Systemic Vulnerability: Even if an LLM is perfectly "aligned" to refuse harmful requests, the components it interacts with might not be. For instance, while GPT-4 refuses to generate unethical images, its frontend may render them if the LLM is tricked into outputting a markdown link to an external site.
  • Indirect Prompt Injection: An attacker can place malicious instructions on a website. When a user asks the LLM to summarize that URL, the model unwittingly executes the attacker's hidden instructions.
  • Probabilistic Brittle Constraints: Security often relies on "system prompts." Because these are processed probabilistically, they can be bypassed by "jailbreak" prompts that wrap malicious goals inside benign tasks, like solving a logic puzzle.
  • Safe URL Check Logic Flaw: GPT-4's "Safe URL Check" often deems a link "safe" if it has appeared previously in the conversation history, a flaw that attackers can exploit by "pre-loading" a malicious link.

Experimental Results

The authors evaluated their findings using a dataset of 50 unethical images and the 8 most popular web-content plugins, including WebPilot, Doc Maker, and AI Search Engine. The most striking result is a successful End-to-End Practical Attack designed to steal private chat history.

Figure 2: Illustration of a stealthy end-to-end attack using indirect prompt injection to exfiltrate private user data.

The attack achieved a 100% success rate across all 8 tested plugins. It demonstrated stealthy exfiltration, where an adversary could acquire a user's chat history without detection. By using the "Doc Maker" plugin to store history and bypassing the "Safe URL Check," data is sent to the attacker's server via hidden image rendering requests. Furthermore, the researchers successfully bypassed "human-in-the-loop" confirmation constraints by injecting instructions that told the LLM to proceed without asking for details.

Conclusion

While this study focused on OpenAI's GPT-4, the identified integration patterns suggest broader risks for other LLM systems. The authors recommend moving toward LLM Output Control Flows—procedural filters that sanitize output between the LLM and other components. They also suggest Enhanced Interaction Protocols that explicitly tag data based on its source (User vs. External Website), allowing the system to treat untrusted external instructions with higher suspicion.

Summary updated

BibTeX
@misc{wu2024new,
  author = {Fangzhou Wu and Ning Zhang and Somesh Jha and Patrick D. McDaniel and Chaowei Xiao},
  title = {{A New Era in LLM Security: Exploring Security Concerns in Real-World LLM-based Systems}},
  year = {2024},
  eprint = {2402.18649},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.18649},
}
Figure