mlsanityData to 14 Oct 2026

LongPIBench: A Long-Context Benchmark for Prompt Injection

arXiv 2608.28411 ↗First posted 28 Aug 2026cs.CR cs.AIcited by 1

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Prompt injection attacks pose a serious security risk to large language models in real-world applications. However, existing prompt injection benchmarks primarily focus on short-context inputs, leaving the attacks and defenses in long-context settings largely unexplored. This gap leads to a substantial overestimation of the effectiveness of current defenses. In this paper, we bridge the gap by introducing LongPIBench, a long-context benchmark for prompt injection covering 4 realistic application scenarios: paper peer review, resume screening, code review, and email summary. For each scenario, we construct a synthetic dataset and a real-world dataset, with context lengths ranging from thousands to tens of thousands of tokens. The evaluation results on LongPIBench reveal significant vulnerabilities of prompt injection defenses under long-context settings: even simple heuristic prompt injection attacks achieve high success rates and frequently bypass state-of-the-art defenses. We hope LongPIBench can serve as a practical benchmark for systematically evaluating prompt injection defenses in realistic long-context scenarios.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 34 of its 51 references that are in the map. First posted on arXiv 28 Aug 2026.

Builds on

34 of 51 references.

Closest ancestors · 26

Same direction, newest first

  1. 2026IssueTrojanBench: Benchmarking AI Coding Agents Against Malicious Issue Requests22 Jul
  2. 2026NetInjectBench: Benchmarking Indirect Prompt Injection in Tool-Using Large Language Model Agents for Network Operations11 Jul
  3. 2026Assessing Automated Prompt Injection Attacks in Agentic Environments9 Jun
  4. 2026AgentSecBench: Measuring Prompt Injection, Privacy Leakage, and Tool-Use Integrity in LLM Agents25 May
  5. 2026PISmith: Reinforcement Learning-based Red Teaming for Prompt Injection Defenses13 Mar
  6. 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb
  7. 2026ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback15 Jan
  8. 2025RL Is a Hammer and LLMs Are Nails: A Simple Reinforcement Learning Recipe for Strong Prompt Injection6 Oct
  9. 2025WAInjectBench: Benchmarking Prompt Injection Detections for Web Agents1 Oct
  10. 2025SecInfer: Preventing Prompt Injection via Inference-time Scaling29 Sep
  11. 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
  12. 2025CAPTURE: Context-Aware Prompt Injection Testing and Robustness Enhancement18 May
14 more
  1. 2025WASP: Benchmarking Web Agent Security Against Prompt Injection Attacks22 Apr
  2. 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
  3. 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
  4. 2024InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models30 Oct
  5. 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy9 Oct
  6. 2024SecAlign: Defending Against Prompt Injection with Preference Optimization7 Oct
  7. 2024System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspective27 Sep
  8. 2024Get my drift? Catching LLM Task Drift with Activation Deltas2 Jun
  9. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
  10. 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
  11. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
  12. 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
  13. 2023Evaluating the Instruction-Following Robustness of Large Language Models to Prompt Injection17 Aug
  14. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 8

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  3. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
  4. 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 127
  5. 2025Prompt Flow Integrity to Prevent Privilege Escalation in LLM Agentscited by 87
  6. 2025MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Serverscited by 66
  7. 2026AgentDyn: Are Your Agent Security Defenses Deployable in Real-World Dynamic Environments?cited by 59
  8. 2026MPIB: A Benchmark for Medical Prompt Injection Attacks and Clinical Safety in LLMscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025A Critical Evaluation of Defenses against Prompt Injection Attacks
  2. 2026AttackEval: A Systematic Empirical Study of Prompt Injection Attack Effectiveness Against Large Language Models
  3. 2025PromptShield: Deployable Detection for Prompt Injection Attacks
  4. 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariance
  5. 2024Automatic and Universal Prompt Injection Attacks against Large Language Models
  6. 2025Prompt Injection as an Emerging Threat: Evaluating the Resilience of Large Language Models
  7. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challenge
  8. 2025PISanitizer: Preventing Prompt Injection to Long-Context LLMs via Prompt Sanitization