Goal-guided Generative Prompt Injection Attack on Large Language Models
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Current large language models (LLMs) provide a strong foundation for large-scale user-oriented natural language tasks. A large number of users can easily inject adversarial text or instructions through the user interface, thus causing LLMs model security challenges. Although there is currently a large amount of research on prompt injection attacks, most of these black-box attacks use heuristic strategies. It is unclear how these heuristic strategies relate to the success rate of attacks and thus effectively improve model robustness. To solve this problem, we redefine the goal of the attack: to maximize the KL divergence between the conditional probabilities of the clean text and the adversarial text. Furthermore, we prove that maximizing the KL divergence is equivalent to maximizing the Mahalanobis distance between the embedded representation x and x' of the clean text and the adversarial text when the conditional probability is a Gaussian distribution and gives a quantitative relationship on x and x'. Then we designed a simple and effective goal-guided generative prompt injection strategy (G2PIA) to find an injection text that satisfies specific constraints to achieve the optimal attack effect approximately. It is particularly noteworthy that our attack method is a query-free black-box attack method with low computational cost. Experimental results on seven LLM models and four datasets show the effectiveness of our attack method.
Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 29 of its 43 references that are in the map. First posted on arXiv 6 Apr 2024.
Builds on
29 of 43 references.
Closest ancestors · 2
Same direction, newest first
- 2023Prompt Injection attack against LLM-integrated Applications8 Jun
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 27
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2015DeepFool: a simple and accurate method to fool deep neural networkscited by 1,315
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,052
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2016Practical Black-Box Attacks against Machine Learningcited by 893
- 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
15 more
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 341
- 2023A Survey of Reinforcement Learning from Human Feedbackcited by 259
- 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2023Inverse Scaling: When Bigger Isn't Bettercited by 205
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 189
- 2023Automatically Auditing Large Language Models via Discrete Optimizationcited by 187
- 2024The Impact of Reasoning Step Length on Large Language Modelscited by 152
- 2020The Discrete Gaussian for Differential Privacycited by 134
- 2021WebQA: Multihop and Multimodal QAcited by 109
- 2023MathAttack: Attacking Large Language Models Towards Math Solving Abilitycited by 31
- 2024AttackEval: How to Evaluate the Effectiveness of Jailbreak Attacking on Large Language Modelscited by 26
Built on by
Citing papers per year: 2024: 1; 2025: 16; 2026: 5.
22 papers.
Sort:
By area:
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
- 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
- 2025LLM Agents Should Employ Security Principlescited by 28
- 2025Security Concerns for Large Language Models: A Surveycited by 26
- 2025Doxing via the Lens: Revealing Location-related Privacy Leakage on Multi-modal Large Reasoning Modelscited by 14
- 2025A Survey of Attacks on Large Language Modelscited by 13
- 2025The Hidden Dangers of Browsing AI Agentscited by 11
- 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correctioncited by 8
- 2025TAI3: Testing Agent Integrity in Interpreting User Intentcited by 7
- 2025DeRAG: Black-box Adversarial Attacks on Multiple Retrieval-Augmented Generation Applications via Prompt Injectioncited by 5
- 2025Multimodal Prompt Injection Attacks: Risks and Defenses for Modern LLMscited by 4
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
10 more
- 2024Palisade -- Prompt Injection Detection Frameworkcited by 3
- 2025Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimizationcited by 2
- 2025FuncPoison: Poisoning Function Library to Hijack Multi-agent Autonomous Driving Systemscited by 2
- 2026Agent Security Needs Redefinition through a Holistic Frameworkcited by 2
- 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behaviorcited by 1
- 2025Unified Threat Detection and Mitigation Framework (UTDMF): Combating Prompt Injection, Deception, and Bias in Enterprise-Scale Transformerscited by 1
- 2026The Struggle Between Continuation and Refusal: A Mechanistic Analysis of the Continuation-Triggered Jailbreak in LLMscited by 1
- 2025Sentra-Guard: A Real-Time Multilingual Defense Against Adversarial LLM Promptscited by 0
- 2026StealthMark: Harmless and Stealthy Ownership Verification for Medical Segmentation via Uncertainty-Guided Backdoorscited by 0
- 2026GeoDetect: Geometric Adversarial Detection for VLPscited by 0
- 2026Agent Security Needs Redefinition through a Holistic Framework24 Jul 2026
- 2026GeoDetect: Geometric Adversarial Detection for VLPs16 Jul 2026
- 2026The Struggle Between Continuation and Refusal: A Mechanistic Analysis of the Continuation-Triggered Jailbreak in LLMs9 Mar 2026
- 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correction24 Feb 2026
- 2026StealthMark: Harmless and Stealthy Ownership Verification for Medical Segmentation via Uncertainty-Guided Backdoors23 Jan 2026
- 2025Sentra-Guard: A Real-Time Multilingual Defense Against Adversarial LLM Prompts26 Oct 2025
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025Unified Threat Detection and Mitigation Framework (UTDMF): Combating Prompt Injection, Deception, and Bias in Enterprise-Scale Transformers6 Oct 2025
- 2025FuncPoison: Poisoning Function Library to Hijack Multi-agent Autonomous Driving Systems29 Sep 2025
- 2025Multimodal Prompt Injection Attacks: Risks and Defenses for Modern LLMs7 Sep 2025
- 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behavior25 Aug 2025
- 2025DeRAG: Black-box Adversarial Attacks on Multiple Retrieval-Augmented Generation Applications via Prompt Injection20 Jul 2025
10 more
- 2025TAI3: Testing Agent Integrity in Interpreting User Intent9 Jun 2025
- 2025LLM Agents Should Employ Security Principles29 May 2025
- 2025Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimization26 May 2025
- 2025Security Concerns for Large Language Models: A Survey24 May 2025
- 2025The Hidden Dangers of Browsing AI Agents19 May 2025
- 2025A Survey of Attacks on Large Language Models18 May 2025
- 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMs7 May 2025
- 2025Doxing via the Lens: Revealing Location-related Privacy Leakage on Multi-modal Large Reasoning Models27 Apr 2025
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safety2 Feb 2025
- 2024Palisade -- Prompt Injection Detection Framework28 Oct 2024
- 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
- 2025Multimodal Prompt Injection Attacks: Risks and Defenses for Modern LLMscited by 4
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
- 2024Palisade -- Prompt Injection Detection Frameworkcited by 3
- 2026Agent Security Needs Redefinition through a Holistic Frameworkcited by 2
- 2025Unified Threat Detection and Mitigation Framework (UTDMF): Combating Prompt Injection, Deception, and Bias in Enterprise-Scale Transformerscited by 1
- 2026The Struggle Between Continuation and Refusal: A Mechanistic Analysis of the Continuation-Triggered Jailbreak in LLMscited by 1
- 2025Sentra-Guard: A Real-Time Multilingual Defense Against Adversarial LLM Promptscited by 0
- 2026Agent Security Needs Redefinition through a Holistic Framework24 Jul 2026
- 2026The Struggle Between Continuation and Refusal: A Mechanistic Analysis of the Continuation-Triggered Jailbreak in LLMs9 Mar 2026
- 2025Sentra-Guard: A Real-Time Multilingual Defense Against Adversarial LLM Prompts26 Oct 2025
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025Unified Threat Detection and Mitigation Framework (UTDMF): Combating Prompt Injection, Deception, and Bias in Enterprise-Scale Transformers6 Oct 2025
- 2025Multimodal Prompt Injection Attacks: Risks and Defenses for Modern LLMs7 Sep 2025
- 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMs7 May 2025
- 2024Palisade -- Prompt Injection Detection Framework28 Oct 2024
- 2025LLM Agents Should Employ Security Principlescited by 28
- 2025A Survey of Attacks on Large Language Modelscited by 13
- 2025The Hidden Dangers of Browsing AI Agentscited by 11
- 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correctioncited by 8
- 2025TAI3: Testing Agent Integrity in Interpreting User Intentcited by 7
- 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correction24 Feb 2026
- 2025TAI3: Testing Agent Integrity in Interpreting User Intent9 Jun 2025
- 2025LLM Agents Should Employ Security Principles29 May 2025
- 2025The Hidden Dangers of Browsing AI Agents19 May 2025
- 2025A Survey of Attacks on Large Language Models18 May 2025
- 2025Security Concerns for Large Language Models: A Surveycited by 26
- 2025Doxing via the Lens: Revealing Location-related Privacy Leakage on Multi-modal Large Reasoning Modelscited by 14
- 2025Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimizationcited by 2
- 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behaviorcited by 1
- 2026StealthMark: Harmless and Stealthy Ownership Verification for Medical Segmentation via Uncertainty-Guided Backdoorscited by 0
- 2026StealthMark: Harmless and Stealthy Ownership Verification for Medical Segmentation via Uncertainty-Guided Backdoors23 Jan 2026
- 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behavior25 Aug 2025
- 2025Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimization26 May 2025
- 2025Security Concerns for Large Language Models: A Survey24 May 2025
- 2025Doxing via the Lens: Revealing Location-related Privacy Leakage on Multi-modal Large Reasoning Models27 Apr 2025