[Paper Review] Exploring Vulnerabilities and Protections in Large Language Models: A Survey
This survey systematically analyzes security vulnerabilities in large language models (LLMs), focusing on Prompt Hacking (including Prompt Injection and Jailbreaking) and Adversarial Attacks (Data Poisoning and Backdoor Attacks). It evaluates defense strategies such as anomaly detection, data cleaning, perturbation-based methods, and masking-differential prompting, highlighting the urgent need for robust, adaptive defenses to secure LLMs against evolving threats in real-world deployments.
As Large Language Models (LLMs) increasingly become key components in various AI applications, understanding their security vulnerabilities and the effectiveness of defense mechanisms is crucial. This survey examines the security challenges of LLMs, focusing on two main areas: Prompt Hacking and Adversarial Attacks, each with specific types of threats. Under Prompt Hacking, we explore Prompt Injection and Jailbreaking Attacks, discussing how they work, their potential impacts, and ways to mitigate them. Similarly, we analyze Adversarial Attacks, breaking them down into Data Poisoning Attacks and Backdoor Attacks. This structured examination helps us understand the relationships between these vulnerabilities and the defense strategies that can be implemented. The survey highlights these security challenges and discusses robust defensive frameworks to protect LLMs against these threats. By detailing these security issues, the survey contributes to the broader discussion on creating resilient AI systems that can resist sophisticated attacks.
Motivation & Objective
- To identify and categorize key security vulnerabilities in large language models, particularly those arising from input manipulation and training data poisoning.
- To analyze the mechanisms and impacts of Prompt Hacking, including Prompt Injection and Jailbreaking, in both open-source and closed-source LLMs.
- To investigate Adversarial Attacks such as Data Poisoning and Backdoor Attacks, focusing on their stealth and persistence in real-world settings.
- To evaluate existing defense mechanisms and highlight gaps in current approaches, especially in black-box and few-shot learning scenarios.
- To contribute to the development of resilient AI systems by synthesizing attack and defense patterns across LLM deployments.
Proposed method
- Categorizing LLM security threats into two main families: Prompt Hacking and Adversarial Attacks, based on attack surface and interaction layer.
- Analyzing Prompt Injection through compositional instruction attacks (CIA), including Talking-CIA and Writing-CIA, which embed malicious instructions in benign prompts.
- Evaluating backdoor attacks via trigger-based poisoning, with methods like Robustness-Aware Perturbation (RAP) and Perplexity-Based Detection (ONION) to identify poisoned samples.
- Applying masking-differential prompting (MDP) to detect backdoors by measuring sensitivity to random token masking in input sequences.
- Surveying defense techniques such as anomaly detection using BERT embeddings, dataset cleaning to remove triggers and payloads, and clustering-based detection of poisoned data.
- Synthesizing findings across open-source and proprietary models to assess generalizability and effectiveness of defense mechanisms.

Experimental results
Research questions
- RQ1How do Prompt Injection and Jailbreaking attacks exploit the input-output interface of LLMs to bypass safety controls?
- RQ2What are the structural and behavioral differences between data poisoning and backdoor attacks in LLMs, and how do they manifest in black-box settings?
- RQ3To what extent can existing defense mechanisms like anomaly detection and data cleaning mitigate poisoning attacks without degrading model performance?
- RQ4How effective are perturbation-based and perplexity-based detection methods in identifying backdoors in LLMs with limited access to model internals?
- RQ5What are the key challenges in developing generalizable, adaptive defenses against evolving LLM attacks in real-world applications?
Key findings
- Prompt Injection attacks, such as Compositional Instruction Attacks (CIA), can successfully bypass safety filters by embedding malicious instructions within seemingly benign conversational or narrative prompts.
- Jailbreaking techniques exploit model alignment and instruction-following behavior to induce harmful outputs, including data leakage and generation of malicious content.
- Backdoor attacks in LLMs are effective even with minimal poisoned data, and can be detected using methods like Robustness-Aware Perturbation (RAP) and Perplexity-Based Detection (ONION).
- Masking-Differential Prompting (MDP) demonstrates strong performance in few-shot backdoor detection by leveraging increased sensitivity of poisoned samples to random masking.
- Anomaly detection using BERT embeddings and dataset cleaning are effective for identifying outliers and removing triggers, but they often reduce model utility and accuracy.
- Despite existing defenses, data poisoning remains a critical threat due to limited protection from current filtering and capacity-reduction strategies, underscoring the need for more robust, high-utility solutions.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.