The Emerged Security and Privacy of LLM Agent: A Survey with Case Studies

Feng He, Tianqing Zhu, Dayong Ye, Bo Liu, Wanlei Zhou, Philip S. YuACM Computing Surveys 2024 · DOI · OpenReview

Abstract

Inspired by the rapid development of Large Language Models (LLMs), LLM agents have evolved to perform complex tasks across various domains, handling vast amounts of data to interact with humans and environments. While their widespread application demonstrates significant commercial value, it also exposes critical security and privacy vulnerabilities. This survey provides a comprehensive overview of these newly emerged issues. We introduce the fundamental knowledge of LLM agents, categorize and analyze threats, and discuss their impacts on humans, environments, and other agents. By reviewing existing defensive strategies and exploring future trends, this survey seeks to stimulate research toward enhancing the reliability and trustworthiness of LLM agents.

Introduction

Traditional machine learning security has historically focused on model accuracy and data poisoning. However, the transition from static LLMs to autonomous LLM agents introduces a paradigm shift. Unlike standard chatbots, agents operate within a "Perception-Thought-Action" cycle, interacting directly with external digital and physical environments.

This paper addresses a critical gap in current AI safety research: while the community understands how to "jailbreak" a text-based model, we are less prepared for an agent that can autonomously execute code, manage financial transactions, or control smart home infrastructure. A vulnerability in an agentic workflow does not just result in a biased answer; it can lead to tangible physical harm, financial loss, or systemic misinformation.

The Agentic Workflow

To understand the security risks, one must first understand how an agent functions. The core of an LLM agent is its ability to close the loop between observation and execution.

The Perception-Thought-Action cycle of an LLM agent.

As shown in the workflow above, agents perceive environmental inputs, reason through a "Thought" phase to plan their next steps, and then execute "Actions" via tools or interfaces. This loop creates a massive new attack surface, particularly during the Perception and Action phases, where malicious inputs can trigger unauthorized real-world operations.

Taxonomy of Threats

The survey establishes a formal taxonomy for these risks, dividing them into two primary categories:

  1. Inherited Threats: These vulnerabilities stem directly from the underlying LLM. They include hallucinations, catastrophic forgetting (where a model loses prior knowledge during fine-tuning), and standard prompt injection attacks.
  2. Agent-Specific Threats: These risks emerge specifically from the agent's unique capabilities:
  3. Knowledge Poisoning: Contaminating the external databases an agent relies on to steer its behavior.
  4. Output Manipulation: Inserting "backdoors" into the reasoning process, causing the agent to make malicious decisions while appearing logical.
  5. Functional Manipulation: Exploiting tool interfaces (like APIs or calculators) to steal third-party data or execute malicious code.

Case Study: The Pixelated Virtual Town

To illustrate these threats in a social context, the authors utilize a "Pixelated Virtual Town" case study. In this environment, multiple agents take on roles such as store employees, doctors, or residents.

A case study of an LLM agent (Eva) within a virtual town environment.

In this scenario, a single "poisoned" agent—such as a store employee like Eva—can disrupt the entire community. For instance, if Eva's knowledge base is poisoned with misinformation about a product, she may spread that error to every resident agent she interacts with, leading to an "explosive spread" of misinformation across the town's collective memory.

Benchmarks and Key Results

The paper synthesizes findings from several key benchmarks, including SafeAgentBench, AgentBench, and BIPIA. The quantitative results are sobering:

  • Widespread Vulnerability: According to SafeAgentBench, none of the 16 tested LLM agents achieved a safety score above 60%, with some falling below 20%.
  • Tool Misuse: In Agent-SafetyBench, agents scored an average of only 38.5% on safety during tool-based operations, frequently overlooking permission boundaries.
  • Defense Efficacy: There is hope in defensive strategies. Goal Prioritization can reduce attack success rates from 66% to as low as 3.6% in models like ChatGPT. Furthermore, the AirGapAgent framework demonstrates that it is possible to achieve 97% privacy protection with minimal impact on task performance.

Future Directions and Conclusion

As we move toward Multimodal LLM (MLLM) agents and complex multi-agent systems, the security challenges will only grow. Future research must address the "Utility-Security Trade-off," where robust defenses often slow down reasoning or decrease performance. There is an urgent need for industry standards, including pre-deployment risk assessments and the development of "stateless oracle agents" that can monitor and vet agent actions in real-time to ensure they remain aligned with human safety and privacy.

Summary updated

BibTeX
@article{he2024emerged,
  author = {Feng He and Tianqing Zhu and Dayong Ye and Bo Liu and Wanlei Zhou and Philip S. Yu},
  title = {{The Emerged Security and Privacy of LLM Agent: A Survey with Case Studies}},
  journal = {ACM Computing Surveys},
  year = {2024},
  doi = {10.1145/3773080},
}
Figure