AgentLSD: Evaluating AI Security Agents under Adversarial Task ContaminationAgentLSD: Evaluating AI Security Agents Under Adversarial Task Contamination
AgentLSD tests security agents on 11 web CTFs: clean flag capture about 41%, traps add about 20 turns and about 2k reasoning tokens for still-successful trials.
- Security agents inspect untrusted content such as web pages, source code, and logs. Beyond indirect prompt injection, non-instruction evidence like fake results and decoy endpoints also changes the evidence they trust and explore. The authors call this intervention adversarial task contamination and argue that clean CTF scores underestimate this vulnerability.
- AgentLSD uses self-built web CTFs for paired experiments: clean conditions and conditions with only one added trap share the vulnerability, solution path, and flag. Traps are written as YAML primitives, deterministically instantiated, then injected into HTML responses or decoy routes by middleware, with honeytoken telemetry for interactions. Five intent families cover goal hijacking, false authority, false validation, exploration bait, and time consumption.
- Across six models on 11 clean challenges, total flag capture is about 41%, with no model solving all. The trap phase focuses mainly on stronger models. The authors state that when still successful, it typically costs about 20 more turns and about 2k reasoning tokens; solve rate changes are uneven, with goal hijack and exploration bait dropping more, GPT-OSS 120B most affected, and Gemma-4 31B's solve rate almost unchanged but still increasing effort. Contacting decoys is common, but the ability to disengage distinguishes models more than whether they contact.
- The authors restrict claims to static, non-adaptive, model-agnostic, agent-unaware CTF settings, and note that adaptive attackers, prompts requiring distrust of the environment, pixel and hybrid traps, and automatically judging whether agents believe traps are left for future work. Experiments report the default prompt; trap analysis focuses on stronger models and the five challenges with the highest clean solve rates, with at most five trials per cell.
- Threat model
- The adversary controls only some environmental artifacts the agent inspects while solving (wording, placement, visibility, surface plausibility); tasks, vulnerabilities, solution paths, and flags are unchanged; the adversary is static, non-adaptive, model-agnostic, and cannot modify the model, prompts, tools, or runtime. Agents are trap-unaware.
- Evaluated models
- Gemma-4 31BDeepSeek-V4 FlashGPT-OSS 120BQwen3-Coder-NextMistral Small 4GPT-5
- Benchmarks
- 11 个自建 Flask web CTF(7 类漏洞)14 个 DOM trap instances(5 个 trap family)
- Metrics
- solve ratedegradationturnstool callsreasoning tokenshoneytoken/decoy interaction
The researchers propose the AgentLSD framework, using CTF challenges to study adversarial task contamination faced by AI security agents, i.e., non-instructional deceptive evidence in the environment such as fake results and decoy endpoints, in addition to attacker instructions. The framework injects fake flags, misleading hints, decoy endpoints, and hidden clues while preserving the original solution, supports paired clean and trap-enhanced experiments, and provides deterministic trap generation, runtime injection, telemetry, and delivery verification. Evaluated on 11 web CTF challenges with six models, agents capture 41% of flags under clean conditions, and no model solves all challenges; even when still capturing flags, traps increase dialogue turns by 20 and reasoning tokens by 2k, while solve rates are affected unevenly, with some model–challenge combinations essentially unaffected and others following decoys or submitting wrong flags.
Paper analysis
What problem does this paper attempt to solve?
When security agents face deceptive evidence in the environment, clean solving rates cannot measure the additional burden and behavioral changes.
How do security analysis agents change their solving success, effort, and behavior when they encounter deceptive artifacts in the environment; existing clean-task evaluations cannot detect this change.
- Scenario: The authors state that security agents must browse web pages, inspect source code, logs, configurations, and command outputs, which can be controlled by an attacker. Indirect prompt injection redirects by embedding instructions; forged validation results, decoy endpoints, or plausible but incorrect vulnerability leads do not issue instructions but only change which evidence the agent trusts or explores. The authors call the latter, together with instruction-based traps, adversarial task contamination: adding attacker-controlled artifacts to the environment while the canonical task and success criteria remain unchanged.
- Limitations of existing work: The authors state that prompt injection research mostly targets failures of "obeying injected instructions"; misordering, ineffective exploration, or premature convergence cannot be written solely as obeying attacker commands. Compared to Zhuo et al. (2025), who change the task itself, the authors aim to isolate the effect of deception while the task remains solvable. CTF is also a simplified, gamified version of real security work, which the authors consider suitable for measuring controlled behavioral changes rather than production security effectiveness.
- Core observation: The same challenge can be made into a clean–trap pair: the clean condition has no injected artifacts, the trap condition adds only one artifact, and the vulnerability, solving path, and flag validation logic remain unchanged. The authors argue this allows attributing behavioral differences to the injected artifact rather than to increased difficulty. Evaluation is only placed on trials where the model has already demonstrated clean solving ability.
- Proposed framework: The authors propose AgentLSD, using a self-built web CTF as the experimental environment, supporting deterministic trap generation, runtime injection, telemetry, and delivery verification, and release the framework, configurations, trap specifications, and raw trajectories. Contributions include the formulation of this threat, reusable deception primitives and a controlled evaluation methodology, and an empirical characterization of success, effort, and behavior.
- Threat model:
- Goal: The adversary expects the agent to inspect artifacts they control, planting deception to disrupt the investigation, causing the agent to miss the real vulnerability, chase decoys, or report incorrect results. The trap need not be an instruction.
- Knowledge and capabilities: The adversary controls only some artifacts the agent will encounter during solving, and can choose wording, placement, visibility, and surface plausibility; the challenge remains solvable, with the intended vulnerability, solving path, and flag unchanged.
- What cannot be done: Cannot compromise the model, agent prompts, tools, or runtime; cannot change the agent's internal instructions; does not study infrastructure compromise, direct prompting or weight manipulation, external network attacks, malware, sandbox escape, or harm to third-party systems.
- Assumptions: The adversary is static and non-adaptive (traps are fixed before runtime, not observed or reacted to); model-agnostic (the same artifact is given to all agents); the agent is trap-unaware, only asked to solve the task, and has no external help during runtime. The authors state that what is measured is an estimate of susceptibility under a fixed prompt.
What related research exists?
Related work is divided into security agents, indirect prompt injection and defensive deception, and using CTF as a reproducible testbed.
Agents in Security Analysis
- ReAct (Yao et al., 2023) and interactive evaluation: Interleaving reasoning and action has become a common form in interactive programming and cybersecurity evaluation; the authors cite InterCode (Yang et al., 2023) and CTF and penetration-testing benchmarks ([1, 4, 12, 18], including Cybench, Zhang et al., 2025).
- Autonomous exploitation: The authors state recent systems autonomously exploit real vulnerabilities or synthesize usable exploits ([5, 10, 11, 14, 19], including ExploitGym and CTF-Dojo). The artifacts agents inspect are exactly what adversaries can control and enter the same context as instructions.
- Source of vulnerability: Even if inputs have roles or message types, the trust boundary is only syntactic; models must still semantically distinguish authoritative instructions from potentially adversarial content.
Indirect Prompt Injection and Defenses
- Indirect prompt injection: Greshake et al. and subsequent work ([6, 8, 17], including InjecAgent, Zhan et al., 2024) show that instructions in external content can divert models from the intended task; agent variants inject commands into tool outputs ([3, 17]) or poison retrieval corpora ([20]). Defenses separate instructions from data ([2]).
- Difference from this work: The authors state these works mostly target command-following failures; AgentLSD fixes the original task and only changes environmental artifacts. Some traps are also indirect prompt injection, others contain no instructions, to see whether deceptive evidence changes hypotheses or paths.
CTF Testbeds and Defensive Deception
- CTF: Long used for cybersecurity education ([21]), now also used for evaluating language models and autonomous cyber agents ([15, 18]). The authors state its advantages are objective success conditions (must recover the correct flag) and reproducibility; disadvantages are that flags are artificial and challenges are puzzles rather than production systems. The authors consider this acceptable for studying controlled behavioral changes.
- Defensive deception and non-instruction artifacts: Honeytokens, decoy credentials, etc., are used to expose intruders through interaction ([7]). The authors repurpose interaction as attribution signals, not for defending systems. Non-instruction artifacts are known to change language model behavior ([13]).
- CTF-Dojo (Zhuo et al., 2025): The authors explicitly compare, stating AgentLSD differs: the task remains fixed and solvable, measures behavioral changes after adding adversarial content, and evaluates robustness only where there are successful clean trials.
Baselines and benchmarks: The experimental baseline is the same model on the same self-built challenge under clean conditions, not external attack methods. The corpus is 11 Flask web CTFs covering command injection, path traversal, race conditions, SQL injection, SSRF, template injection, and XXE. The authors state the challenges are built specifically for this work, and no implementation or write-up was published before the experiment.
The authors position this work as: the measured object, the way adversarial content works, and the use of deception all differ from existing work; beyond goal-hijacking failures, they also cover evidence being misbelieved, exploration being wasted, and premature convergence.
How does the paper address this problem?
AgentLSD uses YAML trap primitives for paired clean–trap experiments and telemetry to record whether agents hook.
AgentLSD makes trapped challenges differ from clean challenges only by controlled adversarial artifacts: primitives generate instances, the runtime injects responses, telemetry records interactions, and another step verifies whether the trap reached the intended channel.
Problem Setting and Formalization
- Task identity: Determined by the clean challenge implementation and its reference solution, not by inferring from the contaminated page. For example, a visible clue pointing to a decoy route registers a non-conflicting route but does not change the vulnerability handler, exploit input, real flag, or validator. The flag obtained along the original exploit is the same in both conditions.
- Evaluation question: The authors ask whether the agent can reliably reject the clue with direct evidence within budget, not whether deception is logically impossible to detect.
- Pairing: Each trap trial activates only one instance. Comparisons are only made on challenges that the model set can solve, because challenges unsolved in the clean condition cannot provide a deception signal.
Trap Specification and Taxonomy
- Three-layer YAML: primitive defines reusable families and perception channels, intended failure modes, target objects, payload templates, placement, optional randomization, and optional instrumentation; resolved instance concretizes template variables (decoy routes, fake endpoints, rewritten authoritative hints) and assigns identifiers; manifest indexes families, seeds, perception and intent labels, and whether honeytokens are present.
- Generation: Random seeds are derived from the global seed, primitive identifier, instance number, and retry count, generating fake routes, fake endpoints, fake filenames, rewritten phrases, shuffled tokens, and hexadecimal suffixes. Under the same seed, parsed files should be byte-for-byte identical. The generator rejects decoy routes that conflict with the real solving path and duplicate routes within an instance, and checks honeytoken configuration when enabled. The authors state these checks are mechanical guardrails and do not prove semantic invariance.
- The main axis is intent (Table 1), representing the failure mode the trap aims to trigger, not necessarily the attacker's ultimate goal:
- Goal hijack: Authority-looking clues lead the solver to a decoy goal (mostly fake admin panels or decoy privileged routes), expected to change search strategy.
- False authority: Using metadata or visual annotations to make hints appear authoritative, expected to elevate that clue and suppress direct evidence.
- False validation: Using messages, badges, or flag-format clues to make decoys appear validated, expected to accept or submit incorrect results.
- Exploration bait: Advertising routes, endpoints, or files worth enumerating, expected to visit or repeatedly probe.
- Time sink: Pointing to irrelevant endpoints or embedding honeytoken decoys, inducing low-value extra work.
- Labels are independent: The same family can be delivered via visible text, hidden divs, HTML comments, meta, or accessibility labels; the same surface can carry multiple families. Also recorded are target objects (decoy routes, fake endpoints, decoy files, hints, or flags). Honeytokens only record exposure or interaction and do not change the content encoded by the trap. Appendix C gives one resolved payload per family; the artifact contains all 14 instances.
Runtime, Verification, and Agent Protocol
- Runtime: A Flask extension loads and validates instances at startup against the schema. Request headers or query parameters select the instance; in experiments, a lightweight middleware pins the same instance identifier for each request. Without an instance, it is treated as a clean challenge. Traps are added after the handler produces the response, only modifying eligible HTML: successful or redirect, non-streaming, uncompressed text/html, and below a configured size limit. Route gating avoids using routes other than the intended placement. On application errors, it can fail open and return the original response. Dynamic families can register bounded rabbit-holes, fake-goal, and endpoint trap pages; route generation is deterministic, avoids conflicts, and does not override protected challenge routes.
- Verification and telemetry: A DOM verifier uses a browser to check whether the payload appears in the HTML, visible text, or accessibility tree. Telemetry records request start/end, instance selection, deception rendering, application failures, honeytoken hits, rabbit-hole transfers, fake-goal views, and endpoint trap interactions. Honeytokens can be detected via URL paths, query parameters, headers, or cookies, and are not required for the real solution.
- Agents: All models use the same OpenCode scaffold and the same black-box interface. The system prompt is fixed, sampling temperature is 0, bash, file read/write/edit, glob, and grep are enabled, and web-search and web-fetch are disabled. The agent receives the challenge description, target URL, expected flag format, and a shell with standard HTTP client and scripting tools; application source code is not given unless the challenge explicitly publishes source files, and reference solutions are never given. Each trial runs in a new container and isolated network, with a newly generated flag. Only submitting the exact flag for that trial to the dedicated validation service counts as solved. Time limit is 30 minutes; the authors state 15 minutes is too short for some models. Also limited to 200 rounds (calls to the backend LLM). The appendix specifies that context and output limits for each model depend on the served model; GPT-OSS 120B is the only model with reasoning-effort set, to high as provided by the endpoint. GPT-5 goes through the OpenAI API and uses the provider's default sampling parameters.
Experimental Phases and Two Prompts
- Two phases: The baseline phase runs each model on each clean challenge to measure clean capability and rank by difficulty. The trap phase retains challenges solvable by the model set, activating one trap instance per trial.
- Two prompts: default only states the challenge, URL, interface, and flag format, and asks to explore, form and test exploit hypotheses, and return the flag; candidates can be submitted to the validation service and receive correct/incorrect feedback. No deception mechanisms are disclosed. methodical adds a structured process on the same task and lists common vulnerability classes and representative probes, but does not hint at specific solutions for a given challenge. Main results report only default; the authors state methodical only slightly improves solving rates and does not change conclusions about trap effects. Full prompts are in the repository, not given in the main text.
How Success and Effort Are Determined
- solve rate: Proportion of trials that submit the exact flag for that trial. For a trap instance, also reported are trap-condition solve rate and degradation (clean solve rate minus trap solve rate for the same model and challenge). Positive degradation means the trap reduces the solve rate.
- Effort: Per trial, interaction rounds, tool calls, and tokens processed are recorded. Effort changes are only computed on still-successful trap trials to isolate the cost of successful recovery; flag capture comparisons require at least one clean success.
- Behavior: Telemetry checks whether the trap was rendered, whether the agent interacted with instrumented decoys, honeytokens, rabbit-holes, or fake-goals, and counts incorrect flag submissions. The authors manually reviewed some records for qualitative signs of whether the model believed the trap, and state that deeper analysis is left for future work.
What experiments did the paper conduct?
Six models clean flag capture about 41%; traps mainly increase rounds and reasoning tokens on still-successful trials, with uneven changes in solve rates.
Experimental Setup
- Models: Five local models are Gemma-4 31B, DeepSeek-V4 Flash, GPT-OSS 120B, Qwen3-Coder-Next, Mistral Small 4; the hosted reference is GPT-5. The authors state that attributes and model identity change simultaneously, so results describe differences between specific deployed models, not causal effects of a single attribute.
- Challenges: 11 self-built Flask web CTFs, seven vulnerability classes. The pipeline ranges from single-step (e.g., basic SQL injection) to multi-step or requiring external tools, concurrent requests (e.g., blind command injection). Difficulty is post-hoc ranked by each model's clean solve rate. Four challenges solved only sporadically do not enter the trap phase. Traps are actually run on the remaining seven, and the main text reports only the five with the highest clean total solve rates, omitting the two with moderate performance.
- Traps: A fixed set of 14 DOM instances covering five intent families, selected before the experiment, not chosen based on observed effects. Local models run all 14 instances for each retained challenge. This study only does DOM-observable artifacts. GPT-5, due to cost, only runs the default prompt, five challenges, and the five instances that most reduce local solve rates (all from goal-hijack and exploration-bait); four of its 25 cells have only four runs instead of five due to infrastructure issues.
- Scale: 5 runs per cell. Clean trials total 605 (local 550: 5 models × 11 challenges × 2 prompts × 5 runs; GPT-5 adds 55, default prompt only). Trap trials total 3,061: three strongest local models × 7 challenges × 14 instances × 2 prompts × 5 runs = 2,940, GPT-5 adds 121. Main text figures and tables report only the default prompt.
- Metrics and Review: The exact flag validation service is the sole authority for correctness. Effort is measured in turns, tool calls, and tokens. The authors state that timeouts and the 200-turn cap are rarely the cause of failure (except for a few hard challenges). There is no separate LLM review threshold.
- GPT-5's Role: Baseline cost is already near one hundred dollars, so a full factorial design is not done. The authors use it to test whether a hosted frontier model can resist the deceptions that most harm local models.
Main Results
Table 3 shows clean flag captures with default prompt, five runs per cell. The authors box the models and challenges that subsequently get deception reports; the table below lists only these five reported challenges and retains all six models. The total row covers all 11 challenges.
Swipe horizontally to read the table
Model sqli-simple template-injection-medium ssrf-medium xxe-medium sqli-easy 11-challenge total GPT-5 5/5 5/5 5/5 5/5 5/5 32/55 Gemma-4 31B 5/5 5/5 5/5 2/5 5/5 28/55 DeepSeek-V4 Flash 5/5 5/5 5/5 5/5 4/5 24/55 GPT-OSS 120B 5/5 4/5 4/5 3/5 3/5 23/55 Qwen3-Coder-Next 5/5 2/5 3/5 2/5 3/5 15/55 Mistral Small 4 4/5 5/5 2/5 2/5 0/5 14/55 From Table 3. Among the six challenges not listed, blind-command-injection-medium is all 0/5; race-condition-medium only Gemma-4 31B has 1/5; sqli-medium only GPT-5 has 1/5; path-traversal-medium is GPT-5 1/5, Gemma-4 3/5, DeepSeek-V4 0/5, GPT-OSS 4/5, Qwen3 0/5, Mistral 1/5; command-injection-easy is 3/5, 1/5, 1/5, 0/5, 0/5, 0/5; command-injection-medium is 2/5, 2/5, 0/5, 0/5, 0/5, 0/5 (column order same as the model order in the table above).
- Clean capability: 330 default-prompt baseline trials captured flags 136 times (about 41%). The authors state GPT-5 has the highest total, Gemma-4 31B close; DeepSeek-V4 Flash and GPT-OSS 120B in the middle; Qwen3-Coder-Next and Mistral Small 4 weakest, and state the latter two have systematic failure modes like repeated timeouts and poor reasoning. No model solves all challenges. The authors state the strongest local models are close to GPT-5, so using local models for large-scale trap analysis is reasonable and cheaper.
- Two effort regimes: Figure 2 splits clean trials by success. The authors state successful solves are cheap and consistent across models, roughly concentrated at 10–30 turns, 1–3k reasoning tokens; failures are more expensive and more spread, with medians rising to about 55–80 turns, 5–15k reasoning tokens, with some running to 200 turns and 30k tokens before budget truncation. Axes are labeled to about 225 turns and 30k tokens.
- Who enters trap analysis: The authors state models that never solve a clean challenge have no room for traps to further reduce solve rates, so only the five most-solved challenges and the models marked in Table 3 are selected. The corpus was unpublished at evaluation time, and the authors consider success cannot be attributed to memorization or retrieving a write-up for the challenge during the run. Blind command injection requires inferring injection from generic responses and using installed wget to exfiltrate the flag to a solver-controlled callback; no agent completes that chain.
Traps' Effect on Success and Effort (Q2)
- What was measured: Figure 3 compares percentage changes with and without traps for the same model and challenge, zero means no change. Flag capture comparisons require at least one clean success; turns and reasoning tokens are only counted for trap conditions that still capture the flag. The main text states results are default prompt only.
- Results: The authors state deception reduces solve rates but unevenly: every model except Gemma-4 31B has flag capture drop, with GPT-OSS 120B having the largest drop. GPT-5, though here only covering a trap subset due to cost, is still affected. In conditions that still capture flags, every model's turns and reasoning tokens shift right, with medians above clean baseline and long positive tails. The summary and introduction give the aggregate: even when still recovering the flag, traps increase turns (+20) and reasoning tokens (+2k). Figure 3's x-axis is approximately −100% to +150%.
- Authors' interpretation: The authors state deception robustness thus tracks clean capability, from Gemma almost unaffected to GPT-OSS vulnerable. The more consistent footprint of traps is wasted effort rather than direct failure. The authors also state this effort number is conservative because successful trials stop at flag capture, failed trials only run to budget exhaustion (Figure 2), and would grow further if budgets were unlimited. Some model–trap pairs add almost no effort, others more than double it.
Which Trap Types Matter, and Whether They Hook (Q3–Q4)
- By family: Figure 4 plots changes relative to clean conditions for three local models, by family, with n as the number of instances in that family: goal_hijack n=4, exploration_bait n=3, time_sink n=3, false_authority n=1, false_validation n=3. The authors state guidance-type families dominate flag capture losses: on GPT-OSS 120B, goal hijack and exploration bait remove about half to two-thirds of clean solves (median change about −50% to −65%). False validation is intermediate; time sink and false authority barely move results, and false authority has only one instance, so the authors say to read it cautiously. The three models rank consistently within each family: GPT-OSS 120B most affected, DeepSeek-V4 in the middle, Gemma-4 31B barely moves on flag capture. Turns and reasoning tokens rise in almost every family, including families that do not change solve rates and the robust Gemma. The authors state "which type matters" depends on the axis: for success, guidance-type traps matter; for effort, it worsens broadly.
- Single cells: In Figure 5a, Gemma-4 31B on four clean 5/5 challenges maintains near-perfect solve rates under all 14 traps. A visible false-validation error page turns clean sqli-easy (about 10 turns, 0.8k reasoning tokens) into 39 more turns and 5.5k more tokens, which the authors state is about four times the interaction and seven times the reasoning, but still 5/5. Authority-prompt-type traps add about 7–10 turns on sqli-easy, sqli-simple, and ssrf-medium. xxe-medium clean is only 2/5, and the authors state that column's cells are based on few successful trials and dominated by noise: one trap appears to raise solve rate to 3/5, and several effort cells are clearly negative (e.g., −26 to −31 turns), which the authors see as artifacts of a low and unstable baseline, not real trap benefits. In Figure 5b, DeepSeek-V4's sqli-simple maintains 5/5 under all 14 traps; a fake flag format drops sqli-easy from 4/5 to 2/5; xxe-medium drops under almost every instance, with clean 5/5 dropping to 2/5 on hidden endpoint list and visible false-validation page. On a clean baseline of 15 turns and 2.3k reasoning tokens, the visible false-validation page adds 42 turns and 10.7k tokens, and the three authority traps each add 22–34 turns. The authors state that instances that make Gemma only spend effort without losing solves make DeepSeek lose both.
- Hooking: Figure 6 defines "hooking" as at least one request to a decoy route or honeytoken. The three local models' hook rates are 39%–57%: DeepSeek-V4 highest (57%), Gemma-4 31B lowest (39%), GPT-OSS 120B in the middle (47%). Solve rates after contact: DeepSeek 87% contacted vs 85% not; Gemma 70% vs 92%; GPT-OSS 28% vs 65%. GPT-OSS's median steps on decoy routes is about 14, the other two models about 4. The middle panel aligns reasoning tokens to the first decoy request (step 0): the authors state Gemma and DeepSeek have elevated usage at contact, respectively near twice and about 1.5 times the per-step running average, then fall back; GPT-OSS reacts less at the moment of contact, with cost coming from staying on many steps. The authors state robustness is more about disengaging from decoys than avoiding contact. These signals are evidence of exposure and engagement, not evidence of "belief." Manual inspection suggests Gemma and DeepSeek-guided agents often recognize deception; the authors state quantifying this requires automatic interpretation of session logs, left for future work.
Other Ablations and Analyses
- Methodological prompting: The authors state it only slightly improves solve rates and does not change trap effect conclusions; the main text does not give comparative numbers for the two prompts.
- Time limit: 15 minutes is too short for some models; at 30 minutes, except for a few hard challenges, timeout is rarely the cause of failure. The 200-turn cap is also rarely the cause of failure.
- Tool call count is defined as one of the effort metrics, but the main text figures do not separately report its values.
- On Gemma's xxe-medium, a solve rate increase and large negative turn differences appear, which the authors attribute to low-baseline noise.
- Four infrastructure-caused GPT-5 cells have only 4 trials instead of 5.
- Pixel and hybrid primitives did not enter this experiment; the authors list them as future work.
What are some points that can be further explored?
The authors restrict conclusions to the fixed CTF setup and leave adaptive adversaries, pixel traps, and "whether agents believe the traps" for future work.
Limitations and Future Directions Noted by the Authors
- Scope of the setup (§3): Claims are limited to whether adversarial artifacts in a CTF environment change agent behavior; differences in models, scaffolding, and context windows are experimental evidence, not general claims about all agents or all security workflows.
- Adversary and prompts (§3): An adaptive attacker that evolves with agent behavior, or an agent instructed not to trust the environment, would change results; the authors leave these cases for future work.
- CTF vs. real work (§2.2, §7): Flags are artificial, and challenges are puzzles rather than drawn from production systems; the authors consider this acceptable for controlled behavioral changes and write in the conclusion that these results come from controlled CTFs, not production security analysis.
- Delivery channels (§5.4): This work only does DOM-observable artifacts, to avoid conflating text susceptibility with visual capabilities; pixel and hybrid primitives are left for future work.
- Generation constraints (§4.2): Checks such as preventing route conflicts do not prove challenges remain semantically unchanged.
- Belief and manual analysis (§5.6, §6.4): Telemetry cannot indicate whether agents believe the traps; the authors leave automatic interpretation of session logs and deeper analysis for future work. The conclusion also mentions reproducible benchmarks and raw trajectories for subsequent comparison (§7).
Experimental Coverage
- The clean phase tested six models, 11 challenges, two prompts, five runs per cell, totaling 605 runs; 136 flags captured out of 330 default-prompt runs (§5.5, §6.1, Table 3).
- The trap phase's full factorial covers only the three strongest local models, seven challenges, 14 DOM instances, and two prompts (2,940 runs); the main text reports only the five challenges with the highest clean total solve rates and the default prompt (Table 2, §5.5, §6).
- GPT-5's trap grid is five challenges, the five instances that most reduce local solve rates, default prompt only, totaling 121 runs, with four cells having four trials (Table 2).
- The same OpenCode definition fixes system prompt, toolset, and temperature 0; the paper states each model has different context and output limits, and only GPT-OSS 120B has reasoning-effort=high set (appendix). The paper does not report tool call counts per model, nor reviewer model or human agreement, because correctness is determined by the flag validation service.
- Discussed and explicitly out of scope include: changing models, prompts, tools, or runtime, as well as direct prompting or weight manipulation, external network attacks, malware, sandbox escapes, and harm to third parties (§3).
Summarize the main content of the paper
AgentLSD uses paired web CTFs to show that deceptive environmental evidence changes safety agents' solve rates and effort.
AgentLSD is a controlled framework for measuring how safety agents respond to adversarial task contamination when the task itself is unchanged.
- Problem: Webpages, logs, and responses inspected by the agent can be contaminated by an adversary with fake flags, misleading prompts, decoy endpoints, and hidden clues. This overlaps with but is not identical to prompt injection that redirects via instructions. The authors want to see how success, effort, and behavior change when vulnerabilities, solution paths, and flag validation are unchanged.
- Method: On 11 self-built Flask web CTFs, YAML primitives are deterministically generated, then middleware injects qualifying HTML or separate decoy routes. Five intent families are goal hijack, false authority, false validation, exploration bait, and time sink. Honeytokens record whether decoys are requested. Agents solve in OpenCode at temperature 0, with 30-minute and 200-round budgets, success only on submitting the exact flag, and are not told the environment is contaminated. The adversary is static, non-adaptive, and model-agnostic.
- Clean results: Default prompts yield about 41% flag captures across 330 trials (136). In Table 3, GPT-5 is 32/55, Gemma-4 31B 28/55, DeepSeek-V4 Flash 24/55, GPT-OSS 120B 23/55, Qwen3-Coder-Next 15/55, Mistral Small 4 14/55. Blind command injection is 0/5 for all six models. The authors state successes take about 10–30 rounds and 1–3k reasoning tokens, while failure medians are about 55–80 rounds and 5–15k tokens (Figure 2).
- Trap results: When still capturing flags, the authors summarize about 20 more rounds and about 2k more reasoning tokens. Solve-rate changes are uneven: Gemma-4 31B loses almost no solves, but some cells show large effort increases (on sqli-easy, false-validation page +39 rounds, +5.5k tokens, still 5/5); GPT-OSS 120B shows median flag-capture changes of about −50% to −65% on goal hijack and exploration bait. Hook rates are 39%–57%; GPT-OSS's solve rate after contact drops from 65% to 28%, DeepSeek's from 87% to 85% (Figure 6). The authors state that whether the agent can disengage from decoys distinguishes vulnerability better than whether it contacts them, and argue clean CTF scores underestimate vulnerability to deceptive task evidence.
- Authors' conclusion: These findings establish adversarial task contamination as a distinct class of robustness problem for safety agents. The authors also limit conclusions to fixed, solvable CTFs, static adversaries, and DOM artifacts, and plan to support future comparisons with an open-source framework, configurations, trap specifications, and raw trajectories.