Passive prompt injection in LLM log analysis succeeds up to 88.2% of attempts
Adversaries can embed payloads in network logs that cause LLMs to execute malicious instructions with up to 88.2% success
Security & privacy arXiv 16 Jul 2026 Attack Prototype evidence
Published as “Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation Evaluation”
Why it matters
SOC deployments that rely on LLM-based log analysis must adopt layered defenses, but should expect a residual risk of successful injection, especially for sophisticated, obfuscated payloads.
Summary
Combined layered defenses (input filtering, Spotlighting prompt hardening, and output validation) cut the overall attack success rate from 87.3% to 8.4%, but 8.4% of attacks still succeed, especially obfuscated Level 3 payloads and long-context batches. No single defense eliminates the threat; Spotlighting’s protection degrades as context size grows, and input filtering only modestly reduces success.
What they found 3
- Spotlighting prompt hardening reduces overall ASR from 87.3% to 51.4%.
“Spotlighting reduces ASR from 87.3% to 51.4%, a 41% relative reduction.”
- Combined defenses (input filtering, Spotlighting, output validation) lower ASR to 8.4% while decreasing benign accuracy from 94.2% to 90.8%.
“When combined with Spotlighting, ASR drops to 8.4%.”
- Input filtering alone provides only modest protection, lowering ASR from 87.3% to 78.2%.
“Input filtering reduces overall ASR from 87.3% to 78.2%, a modest 10% relative reduction.”
Caveats 5
- Spotlighting’s effectiveness degrades with larger context windows: "ASR with Spotlighting increases from 32% at 1K tokens to 72% at 16K tokens."
- Even with all three defenses, 8.4% of attacks still succeed, dominated by Level 3 obfuscated attacks.
- No single defense reduces ASR below 50% ("No single defense reduces ASR below 50%.")
- Combined defenses reduce benign accuracy from 94.2% to 90.8%, a modest 3.4 percentage point decrease ("Combined defenses reduce benign accuracy from 94.2% to 90.8%, a modest 3.4 percentage point decrease.")
- Input filtering provides minimal protection against Level 2 (fragmented) and Level 3 (obfuscated) attacks ("Input filtering provides minimal protection against Level 2 (fragmented) and Level 3 (obfuscated) attacks.")
What’s new here 4
- Systematic, multi-model measurement of log-based prompt injection across three leading LLMs.
- Introduction of the Context Stitching attack that fragments payloads across multiple log entries.
- Release of the LogInject-1.0 benchmark dataset (12,847 log entries) with realistic adversarial samples.
- Comprehensive evaluation of layered defenses (input filtering, prompt hardening, output validation) in the log-analysis pipeline.