mlsanityData to 7 Oct 2026

Maatphor: Automated Variant Analysis for Prompt Injection Attacks

arXiv 2312.11513 ↗First posted 12 Dec 2023cs.CR cs.AI cs.LGcited by 12

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

  1. 2023Multi-step Jailbreaking Privacy Attacks on ChatGPT11 Apr

Other references · 12

  1. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  2. 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 973
  3. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  4. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
  5. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
  6. 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
  7. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
  8. 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
  9. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
  10. 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injectioncited by 143
  11. 2023Backdoor Attacks for In-Context Learning with Language Modelscited by 92
  12. 2023Last One Standing: A Comparative Analysis of Security and Privacy of Soft Prompt Tuning, LoRA, and In-Context Learningcited by 13

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 5; 2026: 1.

12 papers.