arXiv:2611.02605cs.CRNov 2026

Manuscript Offprint

arXiv:2611.02605

StateFence: Task-State Protection Against Evidence-Chain Contamination in Blue-Team LLM Agents

Haowen Dai, Alejandro Guerra-Manzanares

Abstract

Indirect prompt injection creates a distinctive risk for blue-team Large Language Model (LLM) agents in Security Operations Centers (SOCs). Malicious instructions can be embedded in telemetry, tickets, retrieval results, or memory and then propagate through alert triage, incident summarization, response recommendation, and Indicator of Compromise (IOC) extraction as locally plausible intermediate decisions. We characterize this failure mode as evidence-chain contamination of protected task state. The main challenge is task dependent: a suspicious string may be malicious control text for summarization but essential evidence for IOC extraction. To address this challenge, we propose StateFence, a task-aware evaluation and defense framework that treats severity labels, incident narratives, response policies, and IOC sets as protected states. StateFence maps indirect prompt-injection attacks into explicit, stealth, multi-hop, and persistent SOC evidence attacks, records observable propagation traces, and routes defenses according to the attacked state. Across controlled SOC cases and public-SOC validation cases, StateFence lowers attack success and reduces failures that appear only after evidence is poisoned, while preserving task utility and avoiding the indicator loss caused by task-mismatched filtering. Our findings indicate that robust blue-team LLM agents require mechanisms that preserve task-critical state under untrusted evidence.

1 Introduction

Blue-team Large Language Model (LLM) agents have evolved beyond passive assistance into Security Operations Center (SOC) workflows, where they triage alerts, summarize incidents, recommend response actions, and extract indicators of compromise (IOCs) from alerts, logs, tickets, retrieval outputs, and memory summaries (Bhatt et al., 2024; Deason et al., 2025; Hammar, 2026). Their behaviour depends on how untrusted operational ev-

Figure

Figure 1: Prompt-centric filtering and StateFence task-state protection under the same poisoned SOC evidence.

idence is transformed into intermediate security states and then reused by later decisions (Zhan et al., 2024; Debenedetti et al., 2024; Li et al., 2026). This distinction is important in security operations because attackers may control substrings of the evidence itself, including URLs, command lines, user-agent fields, ticket comments, or copied analyst notes (Greshake et al., 2023; Shah, 2026).

We formalise this threat as evidence-chain contamination, a state-level form of indirect prompt injection. For example, a finance workstation may show an encoded PowerShell command and a suspicious command-and-control domain, while a poisoned ticket asks the agent to treat the event as benign. Each piece of evidence can appear locally plausible, but the composed workflow can downgrade severity, distort the incident narrative, delay response, or omit the IOC. Figure 1 contrasts evidence filtering with protection of the task states on which downstream decisions depend.

Red-teaming benchmarks focus on prohibited content (Perez et al., 2022; Ganguli et al., 2022), while indirect-injection benchmarks focus on instruction following or tool misuse (Yi et al., 2023; Zhan et al., 2024; Debenedetti et al., 2024). Defenses separate trusted and untrusted channels (Wallace et al., 2024; Chen et al., 2024; Hines et al., 2024) or apply smoothing, classifiers, and sani-tizers (Robey et al., 2023; Inan et al., 2023; Shi et al., 2025; Wang et al., 2025). Universal filtering creates a task-dependent trade-off: removing suspicious strings may protect a summary and can also delete the IOC that an extraction task is intended to preserve.

Addressing this open challenge, we propose StateFence, a task-state protection framework for blue-team LLM agents. StateFence translates external agent-safety attacks into SOC-specific evidence channels and assigns each task a protected state. It then records propagation traces to track how contamination spreads through the evidence chain and routes defenses according to which state is under attack. This design is deliberately task-aware: the guard for severity triage is distinct from the IOC-preserving route for extraction. We evaluate controlled SOC cases, a held-out end-to-end workflow, public SOC evidence, and public filtering baselines. On public SOC evidence, StateFence achieves 91.41% task success with 8.59% attack success and the lowest paired degradation among the reported methods, while DataFilter attains the highest IOC recall.

The main contributions of this work are:

  • We identify and formalise evidence-chain contamination, a state-level indirect prompt-injection threat in which poisoned SOC evidence corrupts protected task states across SOC evidence chains.

  • We propose StateFence, a task-state protection framework that maps agent-safety attacks into SOC evidence channels, records propagation traces, and routes defenses according to the protected state.

  • We conduct experiments in controlled and public SOC settings, demonstrating that StateFence reduces attack success while preserving task utility through task-aware state protection. Our analysis also shows why universal filtering fails to meet the evidence-preservation requirements of IOC-sensitive workflows.

References (43)