mlsanityData to 14 Oct 2026

Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation Evaluation

arXiv 2607.14493 ↗First posted 16 Jul 2026cs.CRcited by 3

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

Abstract (arXiv)

Large Language Models are increasingly deployed in Security Operations Centers for log analysis tasks including summarization, alert triage, and threat investigation. These systems ingest logs from external-facing services and process network logs as natural language contexts to generate security insights. We demonstrate that this architectural pattern introduces a critical vulnerability: adversaries can embed prompt injection payloads in log-generating fields that persist in storage and are executed when analysts query the LLM, achieving what we term passive prompt injection. We present LogInject, a systematic framework for evaluating these threats. Using LogInject-1.0, a benchmark of 12,847 log entries including 2,569 adversarial samples, we evaluate three production LLMs across four attack objectives: activity concealment, false positive generation, information exfiltration, and output hijacking. Our findings reveal an up to 88.2% attack success rate (83.4% average across models) under the baseline conditions. We introduce Context Stitching, a novel technique that fragments payloads across multiple log entries to evade stateless filters while exploiting LLM long-context reasoning, achieving a 76.4% success rate. As mitigation, we evaluate layered defenses by combining input filtering, prompt hardening, and output validation, demonstrating a 90.4% attack reduction, although 8.4% residual vulnerability persists. Our results establish that LLM-based log analysis creates an inherent confused deputy vulnerability where untrusted data and trusted instructions compete indistinguishably for model attention, requiring defense in-depth architectures and continued human oversight for security-critical decisions.

Key facts. Cited by 3 papers 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 28 of its 44 references that are in the map. First posted on arXiv 16 Jul 2026.

Builds on

28 of 44 references.

Closest ancestors · 19

Same direction, newest first

  1. 2025ObliInjection: Order-Oblivious Prompt Injection Attack to LLM Agents with Multi-source Data10 Dec
  2. 2025PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Features15 Oct
  3. 2025Defending Against Prompt Injection With a Few DefensiveTokens10 Jul
  4. 2025How Not to Detect Prompt Injections with an LLM8 Jul
  5. 2025WebInject: Prompt Injection Attack to Web Agents16 May
  6. 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
  7. 2025Can Indirect Prompt Injection Attacks Be Detected and Removed?23 Feb
  8. 2025PromptShield: Deployable Detection for Prompt Injection Attacks25 Jan
  9. 2024Embedding-based classifiers can detect prompt injection attacks29 Oct
  10. 2024Enhancing Prompt Injection Attacks to LLMs via Poisoning Alignment18 Oct
  11. 2024Optimization-based Prompt Injection Attack to LLM-as-a-Judge26 Mar
  12. 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
7 more
  1. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
  2. 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuning29 Dec
  3. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
  4. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct
  5. 2023Prompt Injection attack against LLM-integrated Applications8 Jun
  6. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
  7. 2022Red Teaming Language Models with Language Models7 Feb

Other references · 9

  1. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  2. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  3. 2023LogGPT: Exploring ChatGPT for Log-Based Anomaly Detectioncited by 35
  4. 2024Towards Explainable Network Intrusion Detection using Large Language Modelscited by 14
  5. 2024A Jailbroken GenAI Model Can Cause Substantial Harm: GenAI-powered Applications are Vulnerable to PromptWarescited by 7
  6. 2024INVARLLM: LLM-assisted Physical Invariant Extraction for Cyber-Physical Systems Anomaly Detectioncited by 2
  7. 2025Semantic-Aware Parsing for Security Logscited by 2
  8. 2025CodeAD: Synthesize Code of Rules for Log-based Anomaly Detection with LLMscited by 1
  9. 2025MINES: Explainable Anomaly Detection through Web API Invariant Inferencecited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Just Testing, Move Along: Evasion of LLM-based System Log Interpretation by Prompt Injection
  2. 2026Poisoning the Watchtower: Prompt Injection Attacks Against LLM-Augmented Security Operations Through Adversarial Log Content
  3. 2025Can LLM Infer Risk Information From MCP Server System Logs?
  4. 2024Systematically Analyzing Prompt Injection Vulnerabilities in Diverse LLM Architectures
  5. 2025Context Misleads LLMs: The Role of Context Filtering in Maintaining Safe Alignment of LLMs
  6. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challenge
  7. 2026ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools
  8. 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysis