Navigating the Risks: A Survey of Security and Privacy Threats in LLM-Based Agents
Top Cited Papers
Open Access
- 7 May 2026
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Abstract
Large language models (LLMs) are increasingly embedded into software engineering workflows as autonomous or semi-autonomous agents for code generation, test synthesis, tool orchestration, and end-to-end task automation. While these agentic capabilities promise substantial productivity and quality gains, they also introduce distinct security and privacy risks at the levels of artifacts, processes, and socio-technical deployment pipelines. These risks threaten the trustworthiness of LLM-powered software and complicate core engineering activities such as specification, design, verification, maintenance, and governance. This survey systematizes the threat landscape for LLM-based agents from a software engineering perspective. We propose a taxonomy organized by threat sources and their impacts across the software lifecycle, explicitly capturing cross-module and cross-stage attack surfaces (e.g., tool-use mediation, memory management, and environment interaction). We further distill six agent features grounded in information-flow and control-flow properties that shape risk exposure. We synthesize current mitigation techniques and their limitations for each feature, and conduct four case studies on web search, gaming, navigation, and software development to illustrate practical risks and failure modes. Building on these analyses, we outline research directions in data, methodology, and policy to guide the development of secure and trustworthy LLM-based agents.Keywords
All Related Versions
This publication has 30 references indexed in Scilit:
- HalluciDoctor: Mitigating Hallucinatory Toxicity in Visual Instruction Data2024
- Multi-Modal Hallucination Control by Visual Information Grounding2024
- A survey on large language model based autonomous agentsFrontiers of Computer Science, 2024
- Set-level Guidance Attack: Boosting Adversarial Transferability of Vision-Language Pre-training Models2023
- Diffusion Art or Digital Forgery? Investigating Data Replication in Diffusion Models2023
- Improving Gender-Related Fairness in Sentence Encoders: A Semantics-Based ApproachData Science and Engineering, 2023
- Membership Inference Attacks From First Principles2022
- Towards Causal VQA: Revealing and Reducing Spurious Correlations by Invariant and Covariant Semantic Editing2020
- Bias on the webCommunications of the ACM, 2018
- Membership Inference Attacks Against Machine Learning Models2017