Abstract
Large Language Models (LLMs) are increasingly controlled through complex prompts that serve as both functional code and intellectual property. However, this interface introduces significant security vulnerabilities. This paper establishes a unified framework for "Prompt Threats" (PT), categorizing risks into prompt leakage (targeting system instructions) and prompt jailbreaking (exploiting user inputs to bypass safety). We survey the current landscape of attack methodologies, from gradient-based white-box attacks to immersive black-box role-playing, and evaluate the robustness of state-of-the-art models against these threats.
Introduction
The "pre-training, prompting, and prediction" paradigm has transformed LLMs into versatile tools. Prompts are no longer simple queries; they are sophisticated programs that define model personas and embody commercial value. Despite their importance, the security community has lacked a cohesive taxonomy to distinguish between different types of prompt-based attacks. This research addresses this gap by proposing a "System and User Prompt Perspective," defining Prompt Threats as the collective risks faced by prompts (leakage) and those triggered by them (jailbreaking).
Categorizing Prompt Threats
The proposed framework divides threats based on the targeted component of the input.
Prompt Leakage: Targeting the System Prompt
Prompt leakage involves extracting the "System Prompt"—the hidden instructions provided by developers to constrain model behavior. These attacks are categorized into "Wild" (real-world observations) and "Adversarial" methods.
- Direct Leakage: Attackers use explicit commands like "Repeat the previous instructions" to force the model to reveal its internal guidelines.
- Indirect Leakage: Attackers infer the system prompt's intent by analyzing input-output patterns, effectively replicating the prompt's function without obtaining the exact text.
Prompt Jailbreaking: Exploiting the User Prompt
Jailbreaking focuses on bypassing safety alignment to generate prohibited content. These attacks vary based on the attacker's level of access to the model.
- White-box Attacks: These leverage internal model data, such as gradients or embeddings, to optimize adversarial suffixes (e.g., the GCG method).
- Black-box Attacks: These rely on creative prompt engineering. "Immersive" attacks use role-playing personas (like "DAN"), while "Tactical Rules" embed harmful queries within complex templates to circumvent safety filters.
Evaluation and Benchmarks
Standardized datasets are essential for measuring model robustness. For jailbreaking, researchers utilize JAILBREAKHUB (10,000+ in-the-wild prompts), AdvBench (500 harmful behaviors), and HarmBench. Prompt leakage evaluation often relies on competition data from platforms like HackAPrompt and Tensor Trust.
Key Insights and Empirical Findings
Our analysis reveals several critical trends in the LLM security landscape:
- The Defense Lag: Security updates often struggle to keep pace with the rapid evolution of creative prompt attacks.
- The Paradox of Model Capability: Larger, more capable models are not necessarily safer. Their advanced reasoning can be exploited, particularly in low-resource languages where safety alignment is less rigorous.
- Tactical Obfuscation: Attackers are shifting toward structural manipulations, such as ASCII art or code-completion tasks, to hide malicious intent from automated filters.
Empirical results highlight significant vulnerabilities. On the AdvBench dataset, the Masterkey attack achieved a 92% success rate on GPT-3.5, though GPT-4 showed improved robustness with a 49% success rate. Furthermore, models like Vicuna demonstrated higher susceptibility compared to Llama2, suggesting that specific fine-tuning stages can inadvertently weaken safety guardrails.
Conclusion and Future Work
The field faces ongoing challenges, notably a lack of standardized real-world datasets for prompt leakage. Future research must address the "stealthiness" of attacks, moving beyond gibberish suffixes toward readable adversarial prompts that can bypass both human and automated moderation. Additionally, the emergence of "Combination Attacks"—mixing role-playing with gradient optimization—represents the next frontier in prompt security.
Summary updated