Maatphor: Automated Variant Analysis for Prompt Injection Attacks
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Prompt injection has emerged as a serious security threat to large language models (LLMs). At present, the current best-practice for defending against newly-discovered prompt injection techniques is to add additional guardrails to the system (e.g., by updating the system prompt or using classifiers on the input and/or output of the model.) However, in the same way that variants of a piece of malware are created to evade anti-virus software, variants of a prompt injection can be created to evade the LLM's guardrails. Ideally, when a new prompt injection technique is discovered, candidate defenses should be tested not only against the successful prompt injection, but also against possible variants. In this work, we present, a tool to assist defenders in performing automated variant analysis of known prompt injection attacks. This involves solving two main challenges: (1) automatically generating variants of a given prompt according, and (2) automatically determining whether a variant was effective based only on the output of the model. This tool can also assist in generating datasets for jailbreak and prompt injection attacks, thus overcoming the scarcity of data in this domain. We evaluate Maatphor on three different types of prompt injection tasks. Starting from an ineffective (0%) seed prompt, Maatphor consistently generates variants that are at least 60% effective within the first 40 iterations.
Key facts. Cited by 12 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 13 of its 22 references that are in the map. First posted on arXiv 12 Dec 2023.
Builds on
13 of 22 references.
Closest ancestors · 1
Same direction, newest first
Other references · 12
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 973
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
- 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
- 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injectioncited by 143
- 2023Backdoor Attacks for In-Context Learning with Language Modelscited by 92
- 2023Last One Standing: A Comparative Analysis of Security and Privacy of Soft Prompt Tuning, LoRA, and In-Context Learningcited by 13
Built on by
Citing papers per year: 2024: 6; 2025: 5; 2026: 1.
12 papers.
- 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathwayscited by 122
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Modelscited by 112
- 2024Red-Teaming for Generative AI: Silver Bullet or Security Theater?cited by 81
- 2024InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Modelscited by 36
- 2024SPML: A DSL for Defending Language Models Against Prompt Attackscited by 33
- 2025BrowseSafe: Understanding and Preventing Prompt Injection Within AI Browser Agentscited by 23
- 2026Ghost in the Agent: Redefining Information Flow Tracking for LLM Agentscited by 14
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systemscited by 12
- 2025AttackPilot: Autonomous Inference Attacks Against ML Services With LLM-Based Agentscited by 2
- 2025AudAgent: Automated Auditing of Privacy Policy Compliance in AI Agentscited by 1
- 2025When GPT Spills the Tea: Comprehensive Assessment of Knowledge File Leakage in GPTscited by 0
- 2025Backprompting: Leveraging Synthetic Production Data for Health Advice Guardrailscited by 0
- 2026Ghost in the Agent: Redefining Information Flow Tracking for LLM Agents25 Apr 2026
- 2025BrowseSafe: Understanding and Preventing Prompt Injection Within AI Browser Agents25 Nov 2025
- 2025AttackPilot: Autonomous Inference Attacks Against ML Services With LLM-Based Agents24 Nov 2025
- 2025AudAgent: Automated Auditing of Privacy Policy Compliance in AI Agents3 Nov 2025
- 2025Backprompting: Leveraging Synthetic Production Data for Health Advice Guardrails25 Aug 2025
- 2025When GPT Spills the Tea: Comprehensive Assessment of Knowledge File Leakage in GPTs30 May 2025
- 2024InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models30 Oct 2024
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systems3 Sep 2024
- 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathways4 Jun 2024
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Models7 Mar 2024
- 2024SPML: A DSL for Defending Language Models Against Prompt Attacks19 Feb 2024
- 2024Red-Teaming for Generative AI: Silver Bullet or Security Theater?29 Jan 2024