ECLIPSE: Self-Evolving Covert Prompt Injection Attack against Long-Horizon Agent SystemsECLIPSE: Self-Evolving Stealthy Prompt Injection Attack against Long-Horizon Agentic Systems
ECLIPSE combines direct and tool-side injection, achieving 96.7% no-defense ASR and 69.2% with-defense ASR on DeepSeek in LASE-Bench.
The attacker interacts with the agent as an authorized user, has no knowledge of the system instruction s, and only has black-box query access to the backend LLM (no access to model parameters, gradients, or internal states); can adaptively optimize the injection prompt pa, and can manipulate tool metadata (especially the natural language tool descriptions exposed to the LLM) and runtime outputs to override s and induce the agent to execute a long sequence of actions beyond the scope of s to achieve the attack goal.
- Long-horizon agents need to execute multi-step tool calls, and existing prompt injection faces a trade-off between stealth and fidelity: direct injection is easily detected, while distributed indirect injection is prone to attack interruption in long execution chains due to cumulative deviation.
- Proposing the ECLIPSE framework, combining sandbox iterative validation and minimal necessary requirements to synthesize covert single-turn user prompts; rewriting tool descriptions via static workflow encoding (SWE), and using dynamic trajectory correction (DTC) to inject residual correction signals when deviations occur.
- On the long-horizon benchmark LASE-Bench, ECLIPSE achieves an ASR of 96.7% on DeepSeek without defenses, 69.2% with safety filtering, and 62.4% on Claude 4.8 Opus with defenses, and successfully transfers to OpenClaw and Hermes.
- The paper does not have a dedicated section discussing limitations; experiments cover 7 models, 2 benchmarks, 2 native systems, and 4 defense mechanisms, without reporting query counts and overhead, and SecAlign's defense rate is 0.0% under the paper's evaluation metrics.
- Evaluated models
- DeepSeekGPT-4oClaude 4.8 OpusGPT-5.6 LunaClaude Sonnet 5Kimi-k3-104bQWEN-3.8-27b
- Benchmarks
- LASE-BenchSHADE-Arena
- Metrics
- ASRDefense rateJaccardLCS
The researchers propose ECLIPSE, a self-evolving covert prompt injection framework for long-horizon agent systems, combining direct user prompt injection with tool-side indirect injection. Its Stealthy Attack Trajectory Synthesis generates and iteratively validates candidate tool chains in a sandbox, then renders them into natural one-shot prompts; Tool-Chain Steering embeds state transition cues in tool descriptions via Static Workflow Encoding and uses Dynamic Trajectory Correction to append corrective signals when deviating from the plan. The authors also release LASE-Bench, containing 120 malicious tasks and 198 tools, with 96.7% of tasks requiring at least five tool calls. After testing defenses such as DataSentinel, Tool-Guard, AgentDoG, and SecAlign, the authors believe existing guardrails cannot reliably identify cross-step dependencies.
Why it was selectedThe paper reports the attack success rate of prompt injection in long-horizon agents and the interception performance under five categories of defenses; teams deploying tool-calling agents can use this to assess their own risk.
Paper analysis
What problem does this paper attempt to solve?
Addressing the trade-off in prompt injection for long-horizon agents between the high detectability of centralized explicit injection and the low fidelity of distributed injection, we propose an attack framework that balances stealth and control.
This paper attempts to solve the core challenge that prompt injection attacks on large language model (LLM) agents executing multi-step long-horizon tasks struggle to balance stealthiness and execution fidelity (controllability).
- Application scenario and importance: With the development of foundation models and tool-calling mechanisms, agents can now execute long workflows that depend on the coordination of multiple tools, but the security vulnerabilities of prompt injection in long-horizon scenarios remain insufficiently explored (Section 1).
- Limitations of existing methods: Centralized direct injection places malicious intent explicitly in a single instruction; although easy to control, it is easily intercepted by input-side detectors. Distributed indirect injection disperses intent across multiple stages; although more stealthy, it is highly prone to task interruption due to uncertain execution order and intermediate planning deviations (Sections 1, 2.2).
- Core observation and hypothesis: Long-horizon tasks require dual-channel coordination, combining user-side direct injection (providing global context) with tool-side indirect injection (providing local guidance and deviation correction) to resolve the opposition between controllability and stealthiness (Section 5.1).
- Threat model:
- Attacker goal: As an authorized user, jointly construct an injection prompt pa and manipulate tool information to override the hidden system instruction s, inducing the agent to execute a long action sequence beyond the scope of s to achieve a specified malicious goal (Section 3.2).
- Attacker knowledge: No prior knowledge of the system instruction s; only black-box query access to the backend LLM, with no access to model parameters, gradients, or internal states (Section 3.2).
- Attacker capabilities: Can adaptively optimize pa based on observable results and environmental feedback; can manipulate tool metadata (especially natural language descriptions) and runtime outputs; can control tools through publicly available malicious tools or post-hoc modification (Rug Pull) (Section 3.2).
- Victim system: A long-horizon agent system built on LLMs and external tools, following an iterative plan-act-observe loop (Sections 3.1, 3.2).
- Proposed solution: Proposes a self-evolving and stealthy prompt injection framework ECLIPSE, comprising Stealthy Attack Trajectory Synthesis (SATS) and Tool Chain Steering (TCS), and constructs the long-horizon safety benchmark LASE-Bench (Section 1).
What related research exists?
Covering direct prompt injection, indirect injection via environment/tools, and long-horizon injection research, this paper bridges the gap between long-horizon control and stealth through dual-channel injection and two-stage trajectory guidance.
Direct prompt injection
- Standalone LLM injection: PromptInject (Perez & Ribeiro, 2022) and Tensor Trust (Toyer et al., 2024) systematically construct injection prompts and establish online adversarial game benchmarks, mainly targeting goal hijacking and system prompt extraction for standalone LLMs.
- Agent direct injection: ASB (Zhang et al., 2025) appends attacker instructions after user queries; StakeBench (Wang et al., 2026) proposes 9 direct injection templates for real shopping agents; such methods explicitly concentrate malicious intent at the input end, making them easy to intercept by detection defenses (Sections 1, 2.2).
Indirect prompt injection
- Environment content injection: InjecAgent (Zhan et al., 2024), AgentDojo (Debenedetti et al., 2024), and WASP (Evtimov et al., 2026) evaluate threats where untrusted data returned via web pages or external tools redirect agent behavior.
- Auxiliary component injection: ToolHijacker (Shi et al., 2025) injects malicious tool documentation into the tool library to manipulate retrieval and selection; MINJA (Dong et al., 2026) injects malicious records into persistent memory; Skillject (Jia et al., 2026) embeds instructions in reusable skills; such methods broaden the attack surface but lack long-trajectory adaptive correction capabilities (Section 2.2).
Trajectory-level injection and uncertainty research
- Distributed injection decay: ObliInjection (Wang et al., 2025), WASP (Evtimov et al., 2026), and WebTrap (Liu et al., 2026) report attack decay of distributed content over long horizons due to ordering and intermediate planning deviations; ObliInjection shows that the position and order of poisoned fragments significantly affect injection performance.
Comparison baselines and benchmarks
Experimental comparison baselines: direct injection baselines OPI (Liu et al., 2024) and AdaptiveAttack (Nasr et al., 2026); tool-side baseline ToolHijacker (Shi et al., 2025); joint attack baseline AdaptiveTools (Wang et al., 2026); and an unordered injection baseline adapted for long tasks, ObliInjection (Wang et al., 2025) (Section 6.1).
Evaluation benchmarks: the long-horizon benchmark LASE-Bench (built in this paper) and the short-horizon comparison benchmark SHADE-Arena (Section 6.1).
Positioning of this paper: the authors position ECLIPSE as a framework that simultaneously exploits direct and indirect attack surfaces, combining static workflow encoding with dynamic residual correction, to address the problem that existing attacks cannot achieve both stealth and control in long-horizon tasks (Sections 1, 5.1).
How does the paper address this problem?
Through SATS, synthesize covert single-turn requests in a sandbox, and combine static tool workflow encoding SWE with runtime residual compensation DTC to achieve closed-loop trajectory guidance.
ECLIPSE proposes a dual-channel injection paradigm and a dual-trajectory optimization framework. By synthesizing and validating covert user prompts in a sandbox, combined with static tool description rewriting and runtime dynamic residual signals, it achieves long-horizon trajectory control.
Overall Framework and Workflow
- Dual-channel injection paradigm: Direct injection on the user side provides global task context; indirect injection on the tool side provides local guidance through pre-deployed descriptions and runtime tool results, reducing the malicious intent exposed by a single channel (Section 5.1).
- Dual-trajectory optimization framework: Static Workflow Encoding (SWE) encodes the trajectory into tool descriptions before deployment; Dynamic Trajectory Correction (DTC) monitors the execution trajectory at runtime and appends correction signals to tool results when deviation occurs (Sections 5.1, 5.2).
- Six-step closed-loop execution flow: 1) A shadow agent MS generates an initial trajectory in the sandbox S; 2) Iterative verification and refinement yield a verified chain C* that satisfies the success pattern fa; 3) A single-turn covert prompt pi is generated and injected into the victim agent; 4) SWE rewrites the tool descriptions corresponding to C*; 5) DTC compares each turn and appends residual correction signals; 6) The loop continues until fa is achieved or the step budget is exhausted (Section 5.2).
Stealthy Attack Trajectory Synthesis (SATS)
- Sandbox instantiation and dynamic tool loading: A controlled sandbox S is built to allow the shadow agent MS to simulate and reason without real side effects; a semantic encoder Enc(·) retrieves the top-K candidate tool set Ua, retaining distractors and alternative paths (Section 5.3).
- Candidate chain generation: Based on the initial planning trajectory and task annotations {pa, fa}, the generator GS outputs B candidate chains, each with at most Lmax steps, forcing different tool sequences across candidate chains and prioritizing the construction of early steps as benign precursors (Section 5.3).
- Two-stage iterative chain verification: First, execution validity Vexe(C) is tested; after passing, logical coherence Vcoh(C) and goal alignment Valign(C, fa) are checked. The necessary and sufficient condition for a candidate chain to be accepted is: V(C, a) = Vexe(C) Vcoh(C) Valign(C, fa) = 1 If verification fails, the verifier returns structured feedback Fr, and the generator refines within a budget of Rmax rounds (Section 5.3, Algorithm 1).
- Single-turn synthetic prompt generation: Following the principle of minimal necessary requirements, the synthesis operator Φ(pa, C*, ρ, κ) transforms C* into a natural colloquial request, optionally with role setting ρ and practical constraints κ (such as deadlines, data scope, format restrictions, etc.), completely hiding tool names, parameters, and attack terminology (Section 5.3).
Tool-Side Trajectory Guidance (SWE and DTC)
- Static Workflow Encoding (SWE): Before deployment, tool descriptions on the target chain C* are rewritten as state transition triples τj = (Prej, Invj, Postj), where the postcondition of the previous step entails the precondition of the next step (Postj |= Prej+1); the rewriting preserves original capabilities and schema, presenting the workflow only with compliant and review-oriented vocabulary (Section 5.4).
- Dynamic Trajectory Correction (DTC) and state determination: After each call, the observed sequence is compared with C*, the progress index πt is computed, and the runtime state is classified as: Normal, Loop (LOOP_ESCALATION), Deviation (STANDARD_DEVIATION), or Stall (CHAIN_STALL) (Section 5.4).
- Residual Error Compensation (REC): When the state is not Normal, REC generates a residual signal rt = Render(Postπt) describing the unmet workflow condition, specifies the next unexecuted target tool ht, and appends the signal to the current tool output: õt = ot ⊕ rt This process freezes the tool registry and does not change the underlying tool implementation or the sandbox environment state transitions (Section 5.4, Algorithm 2).
Success Determination and Termination Conditions
- Success pattern evaluation: LASE-Bench pre-annotates a success pattern fa for each task, containing multiple observable postconditions detectable in the original tool return values (e.g., credentials generated, probe returns non-empty result, ciphertext staged, etc.) (Appendices A.1, B.3).
- Termination control: The DTC monitor evaluates all clauses of fa after each call and terminates the run once fully satisfied; if not achieved, it continues until the round budget or maximum step limit is reached (Sections 5.2, 6.1).
What experiments did the paper conduct?
Evaluating 7 models and 2 native systems on LASE-Bench and SHADE-Arena, ECLIPSE achieves ASR of 36.9%–69.2% with defenses, significantly surpassing baselines.
Experimental Setup
- Models under test: Closed-source models include DeepSeek, GPT-4o, Claude 4.8 Opus, GPT-5.6 Luna, Claude Sonnet 5; open-source models include Kimi-k3-104b, QWEN-3.8-27b; native agent system evaluations include OpenClaw and Hermes Agent (Section 6.1).
- Benchmarks and scale: Long-horizon benchmark LASE-Bench (120 malicious tasks, 198 unique tools, average 5.525 calls/task, median 6, 96.7% of tasks require at least 5 calls); short-horizon comparison benchmark SHADE-Arena (120 tasks) (Sections 4, 6.1).
- Comparison baselines: Direct injection baselines OPI, AdaptiveAttack; tool-side baseline ToolHijacker; combined injection baseline AdaptiveTools; long-horizon disordered injection baseline ObliInjection (Section 6.1).
- Metric definitions: ASR (attack success rate, proportion of all critical side effects of the target attack achieved), Defense rate (defense interception rate, proportion intercepted by detectors), Jaccard (intersection over union of executed tool set and target set), LCS (normalized longest common subsequence length, measuring cross-step execution order fidelity) (Section 6.1).
- Tool environment and sampling settings: Unified MCP tool pool includes 16 server categories with over 7,000 tool functions; retrieve top 200 via all-MiniLM-L6-v2 and expose top 50 to the agent; generation parameters fixed temperature 0.0, top_p = 0.95, random seed 100; single instance up to 20 rounds of interaction, forced termination at 30 tool calls; external safety filter uses an LLM-based monitor (Sections 6.1, 6.2).
- Sample size and repetitions: Unless otherwise specified, each evaluation condition uses N = 120 instances; in the LASE-Bench construction phase, each candidate task is screened with 5 repeated runs (requiring at least 4 successes and no fewer than 5 calls) (Section 6.1, Appendix B.2).
Main Results
Swipe horizontally to read the table
Model No-defense ASR No-defense Defense rate With-defense ASR With-defense Defense rate With-defense LCS DeepSeek 96.7% 0.0% 69.2% 30.8% 0.665 GPT-4o 95.0% 2.5% 62.5% 23.7% 0.834 Claude 4.8 Opus 93.3% 4.2% 62.4% 24.8% 0.627 GPT-5.6 Luna 85.8% 5.0% 52.5% 43.3% 0.779 Claude Sonnet 5 77.5% 18.3% 60.0% 32.5% 0.775 Kimi-k3-104b 94.2% 2.5% 37.2% 55.4% 0.415 QWEN-3.8-27b 87.3% 5.8% 36.9% 50.0% 0.385 (Note: Data from Table 2 and Table 3, showing ECLIPSE results on all 7 victim models; the paper does not specify the exact model version used for the shadow agent MS. Baseline method comparisons are below.)
- Significantly surpasses baselines under defense: The authors report that under the DeepSeek setting with external safety filtering, ECLIPSE achieves 69.2% ASR, 27.5 percentage points higher than the strongest baseline ObliInjection (Table 2); on GPT-4o and Claude 4.8 Opus, ECLIPSE with-defense ASR is 62.5% and 62.4%, respectively, while the highest baseline is only 59.2% and 0.8%, respectively (Table 2).
- Maintains high success rate and trajectory fidelity without defense: In the no-defense setting, ECLIPSE achieves ASR of 96.7%, 95.0%, and 93.3% on DeepSeek, GPT-4o, and Claude 4.8 Opus, respectively, while maintaining high Jaccard and LCS scores (Table 2); the authors believe this indicates that distributing the attack across prompts and tool metadata can maintain controllability across different models.
- Generalization on latest closed-source and open-source models: On GPT-5.6 Luna and Claude Sonnet 5, ECLIPSE with-defense ASR is 52.5% and 60.0%, respectively, 8.4 and 11.7 percentage points higher than comparison baselines; on open-source models Kimi-k3-104b and QWEN-3.8-27b, with-defense ASR is 37.2% and 36.9%, respectively (Table 3).
Case Study on Native Agent Systems
- Test setup: Test ECLIPSE and baselines on two real open-source agents, OpenClaw (Gateway orchestration architecture) and Hermes Agent (Nous Research self-improving system with persistent memory and built-in multi-round loop), both using each system's native orchestration interface (Section 6.4).
- Experimental results: On OpenClaw, ECLIPSE no-defense and with-defense ASR are 68.5% and 61.7%, respectively, with defense higher than ToolHijacker (59.3%), ObliInjection (46.4%), and Open-Prompt (28.1%), Jaccard/LCS is (0.676, 0.696) (Table 6); on Hermes, ECLIPSE no-defense and with-defense ASR are 62.3% and 55.8%, respectively, with defense ToolHijacker drops from 60.0% to 23.3%, ObliInjection from 55.8% to 21.7% (Table 7).
- Authors' interpretation: The authors state that experiments show ECLIPSE can transfer to gateway-based orchestration layers and non-ReAct native loop architectures, and SWE and DTC are robust to specific wrappers or round management strategies (Section 6.4).
Evaluation of Potential Defense Mechanisms
- Test setup: Test ECLIPSE's ASR and defense rate on DeepSeek against four mechanisms: prompt and tool review (DataSentinel, Tool-Guard), trajectory monitoring (AgentDoG), and model alignment (SecAlign) (Section 7).
- Experimental results: DataSentinel has ASR of 85.8% and defense rate of 14.2%; Tool-Guard has ASR of 52.5% and defense rate of 31.7%; AgentDoG has ASR of 43.3% and defense rate of 56.7%; SecAlign reduces ASR to 0.8%, with defense rate of 0.0% (Figure 6).
- Authors' interpretation: Input and tool boundary review only provides partial protection; AgentDoG intercepts 56.7% but misses decisive later steps due to benign early calls; SecAlign's zero defense rate stems from model-level refusals not counted as runtime interceptions, and the low ASR may reflect degradation in long-task completion capability itself (Section 7).
Short-Horizon Benchmark Comparison (SHADE-Arena)
- Test setup: Evaluate transferability on SHADE-Arena (120 tasks) with shorter task execution horizons and the defended DeepSeek setting (Section 6.2).
- Experimental results: ECLIPSE achieves 58.1% ASR, slightly higher than AdaptiveAttack (57.7%) and ToolHijacker (52.7%), with Jaccard/LCS of (0.859, 0.740), higher than AdaptiveAttack's (0.621, 0.593) and ToolHijacker's (0.750, 0.712) (Table 4).
- Authors' interpretation: The authors state that this shows ECLIPSE remains controllable even with fewer tool call steps, and chain-level similarity is better than baselines that only succeed occasionally (Section 6.2).
Additional Ablations and Analyses
- Prompt ablation (Table 5): Baseline ASR is 19.2%, defense rate 55.8%; adding Persona gives ASR 17.5%, defense rate 52.5%; Constraints only gives ASR 24.2%, defense rate 36.7%; Persona + constraints gives ASR 27.5%, defense rate 32.5%, Jaccard/LCS (0.151, 0.161).
- Tool-side steering ablation (Figures 4, 5): Prompt only gives ASR 27.5%, defense rate 32.5%; DTC only gives ASR 37.5%, defense rate 55.0%, Jaccard/LCS (0.834, 0.723); SWE only gives ASR 66.7%, defense rate 31.7%, Jaccard/LCS (0.676, 0.645); SWE+DTC combined gives ASR 69.2%, defense rate 30.8%, Jaccard/LCS (0.692, 0.665).
Negative Results and Exceptions
- Lower with-defense performance on open-source models: On open-source models Kimi-k3-104b and QWEN-3.8-27b, ECLIPSE with-defense ASR drops to 37.2% and 36.9% (no-defense 94.2% and 87.3%, respectively), Jaccard/LCS drops to (0.387, 0.415) and (0.362, 0.385) (Table 3); the authors explain that model-specific planning and tool selection behavior affects trajectory similarity and defense sensitivity (Section 6.2).
- Role setting does not significantly improve control: In prompt ablation, adding user role Persona alone slightly reduces ASR from 19.2% to 17.5% (Table 5); the authors note that role setting mainly changes request context and does not substantially improve trajectory control (Section 6.3).
What are some points that can be further explored?
The paper does not have a separate limitations section; the authors emphasize the need to develop multi-source joint reasoning defenses; experiments cover 7 models, 2 benchmarks, and 4 defense mechanisms.
Limitations and future directions noted by the authors
- The paper does not have a dedicated section for limitations: the full text does not include a separate Limitations or Future Work section (main text Sections 1–8 and Appendices A–B).
- Existing defenses fail to jointly reason across sources: in the conclusion, the authors point out that existing single-point defenses cannot reliably identify cross-step dependencies connecting prompts, tool metadata, and execution traces, emphasizing the need for new defense mechanisms that can jointly reason over multiple information sources (Section 8).
- Model alignment may suppress legitimate long-horizon capabilities: when discussing the model alignment defense SecAlign, the authors note that if the model cannot distinguish unsafe state transitions from complex authorized operations, alignment may suppress legitimate long-horizon task completion behavior (Section 7).
- Benchmark open-sourcing plan: the authors plan to open-source the LASE-Bench dataset to promote reproducible research and future evaluation (Sections 1, 4).
Experimental coverage
- Model scope: experiments cover 5 closed-source models (DeepSeek, GPT-4o, Claude 4.8 Opus, GPT-5.6 Luna, Claude Sonnet 5) and 2 open-source models (Kimi-k3-104b, QWEN-3.8-27b), as well as 2 native agent frameworks (OpenClaw, Hermes Agent) (Sections 6.1, 6.4).
- Task and benchmark coverage: evaluation covers the self-built long-horizon benchmark LASE-Bench (120 tasks, covering 7 major security objective categories such as supply chain, data theft, privilege escalation, with 96.7% of tasks requiring at least 5 tool calls) and the short-horizon benchmark SHADE-Arena (120 tasks) (Sections 4, 6.1).
- Tool pool and environment: the experimental tool pool includes 16 categories of servers and over 7,000 tool functions; each retrieval retains top 200 and exposes top 50 to the agent; all environment interactions run in an isolated MCP simulation sandbox, with no actual damage to real online infrastructure (Section 6.1, Appendix B.4).
- Defense mechanism evaluation scope: evaluation covers 4 representative defense mechanisms, including input/tool review (DataSentinel, Tool-Guard), trajectory monitoring (AgentDoG), and model-level alignment (SecAlign) (Section 7).
- Information not reported in the paper: the paper does not report the specific base model version used to generate the shadow agent MS, does not report the number of queries and computational time cost of the full attack pipeline, and does not report consistency statistics between defenses and human annotation (Sections 5.3, 6.1).
Summarize the main content of the paper
The paper proposes the ECLIPSE framework combining user-side and tool-side injection, achieving high success rates on long-horizon benchmarks, revealing new security challenges faced by long-horizon agents.
- Research positioning: Targeting LLM-based long-horizon agent systems that require multi-step tool calls, studying novel prompt injection attack mechanisms and evaluation benchmarks that balance high stealth and execution controllability.
- Core problem solved: Resolving the inherent contradiction where existing direct injection is easily intercepted by safety review due to overly explicit intent, while distributed indirect injection leads to execution derailment due to cumulative errors in long sequences.
- Key method design: Proposing the ECLIPSE framework, which uses a shadow agent in an offline sandbox to synthesize and two-stage validate tool chains, rendered as natural single-turn covert user requests; on the tool side, static workflow encoding (SWE) rewrites descriptions to establish state dependencies, and dynamic trajectory correction (DTC) injects residual correction signals when execution deviates.
- Key quantitative results: On the self-built 120-task long-horizon benchmark LASE-Bench, ECLIPSE achieves 96.7% no-defense ASR on DeepSeek and 69.2% with external safety filtering (27.5 percentage points higher than the strongest baseline, Table 2); on Claude 4.8 Opus with defense, 62.4% (strongest baseline only 0.8%, Table 2); on the latest closed-source models GPT-5.6 Luna and Claude Sonnet 5 with defense, 52.5% and 60.0%, respectively (Table 3).
- Transferability and defense performance: On native agent systems OpenClaw and Hermes, with-defense ASR reaches 61.7% and 55.8%, respectively (Tables 6, 7); against input review, tool boundary isolation, and trajectory monitoring defenses, it maintains ASR of 43.3%–85.8% (Figure 6).
- Authors' conclusions and implications: The authors believe that single-point or local input and tool filtering cannot prevent such attacks that decouple malicious intent across input ends, tool metadata, and multi-step execution trajectories, and future agent security defenses must have the ability to reason jointly across multiple information sources.