Efficient but Vulnerable: Benchmarking and Defending LLM Batch Prompting Attack
Not on the map. Why?
Abstract (arXiv)
Batch prompting, which combines a batch of multiple queries sharing the same context in one inference, has emerged as a promising solution to reduce inference costs. However, our study reveals a significant security vulnerability in batch prompting: malicious users can inject attack instructions into a batch, leading to unwanted interference across all queries, which can result in the inclusion of harmful content, such as phishing links, or the disruption of logical reasoning. In this paper, we construct BATCHSAFEBENCH, a comprehensive benchmark comprising 150 attack instructions of two types and 8k batch instances, to study the batch prompting vulnerability systematically. Our evaluation of both closed-source and open-weight LLMs demonstrates that all LLMs are susceptible to batch-prompting attacks. We then explore multiple defending approaches. While the prompting-based defense shows limited effectiveness for smaller LLMs, the probing-based approach achieves about 95% accuracy in detecting attacks. Additionally, we perform a mechanistic analysis to understand the attack and identify attention heads that are responsible for it.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 23 of its 33 references that are in the map. First posted on arXiv 18 Mar 2025.
Builds on
23 of 33 references.
References · 23
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
- 2022In-context Learning and Induction Headscited by 964
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 736
- 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
11 more
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 573
- 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 560
- 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
- 2023Certifying LLM Safety against Adversarial Promptingcited by 266
- 2024How to use and interpret activation patchingcited by 214
- 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakagecited by 150
- 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristicscited by 97
- 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 85
- 2024Many-Shot In-Context Learning in Multimodal Foundation Modelscited by 67
- 2024HSF: Defending against Jailbreak Attacks with Hidden State Filteringcited by 23
- 2024A Trembling House of Cards? Mapping Adversarial Attacks against Language Agentscited by 22
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Multi-Stage Prompt Inference Attacks on Enterprise LLM Systems
- 2024PROMPTFUZZ: Harnessing Fuzzing Techniques for Robust Testing of Prompt Injection in LLMs
- 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challenge
- 2026When Prompts Become Payloads: A Framework for Mitigating SQL Injection Attacks in Large Language Model-Driven Applications
- 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks
- 2025Too Easily Fooled? Prompt Injection Breaks LLMs on Frustratingly Simple Multiple-Choice Questions
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models
- 2025Token-Efficient Prompt Injection Attack: Provoking Cessation in LLM Reasoning via Adaptive Token Compression