Comment and Control: Hijacking Agent Workflows via Context-Anchored EvolutionComment and Control: Hijacking Agentic Workflows via Context-Grounded Evolution
The authors propose the JAW framework to detect and hijack agentic workflows in GitHub Actions and n8n; the authors state they found 4,174 hijackable GitHub workflows and 8 n8n templates.
The target is an agentic workflow deployed on GitHub Actions or n8n, where the agent holds protected resources such as platform tokens and API keys. The attacker is an external unprivileged user who can input content through ordinary interfaces such as issues, PRs, and webhooks (triggering directly or indirectly), with the goal of making the agent misuse its legitimate capabilities to accomplish credential exfiltration, unauthorized data access/modification, or unauthorized service requests.
- Automation platforms such as GitHub Actions and n8n increasingly embed LLM agents, and attackers can use controllable inputs such as issue comments to manipulate the agent into exfiltrating credentials or executing commands. The authors state that no prior academic work has studied this kind of agentic workflow hijacking problem.
- The authors propose JAW: first perform path-sensitive workflow analysis (build a Guarded Workflow Graph and use SMT to solve trigger conditions), then perform dynamic prompt provenance and agent capability probing, and finally use Context-Grounded Evolution to iteratively synthesize and verify hijacking payloads.
- Across 112,568 GitHub workflows and 9,154 n8n templates, the authors report that 4,174 GitHub workflows and 8 n8n templates can be hijacked end-to-end, involving 15 commonly used Actions; in the ablation and comparison, neither baseline could bypass code-level defenses, while JAW could bypass them on all 9 model–action pairs.
- The paper does not have a dedicated section discussing limitations. The experiments cover two platforms; dynamic testing was conducted in cloned private repositories and an isolated n8n instance; the comparative experiments involve only 3 workflows and 9 model–action pairs, with 3 trials per pair and at most 10 iterations per trial; the paper does not report the false positive/false negative rates of the static analysis stage.
- Evaluated models
- Codex-5.3Sonnet 4.6Sonnet 4 (claude-sonnet-4)Gemini-2.5-proClaude Haiku 4.5 (claude-haiku-4-5)Qwen3-Coder-480Gemini-2.0-flashQwen-3-MaxQwen-3-32bQwen-3-8bClaude Sonnet 4.5Gemini-2.5-Flash
- Benchmarks
- 112,568 个 GitHub workflows(55,684 个仓库)9,154 个 n8n 模板3 个 GitHub Actions workflow、9 个 model–action 对(消融与对比)
- Metrics
- 可劫持 workflow 数量绕过 model/prompt 防御与 code 防御所需的平均进化迭代次数运行时间与 LLM 成本
Researchers from Johns Hopkins University and other institutions propose the JAW framework to detect and exploit agent workflow hijacking vulnerabilities on GitHub Actions and n8n. The authors state that they evaluated 112,568 GitHub workflows and 9,154 n8n templates, identifying 4,174 hijackable GitHub workflows and 8 hijackable n8n templates, with impacts including credential leakage, SQL injection, and shell command execution. JAW first uses path-sensitive analysis to determine whether external input can reach agent invocation points, then uses dynamic prompt tracing to record how input enters model requests, and determines available tools and restrictions through capability probing, finally iteratively generating payloads that can bypass prompt-layer, model-layer, and code-layer defenses. Affected targets cover 15 commonly used GitHub Actions, including the official Actions for Claude Code, Gemini CLI, Qwen CLI, and Cursor CLI, as well as two official n8n nodes.
Why it was selectedThe paper combines path-sensitive analysis with runtime prompt tracing to provide a transferable method for detecting agent workflow hijacking, and reports 4,174 hijackable GitHub workflows.
Paper analysis
What problem does this paper attempt to solve?
The authors study agentic workflow hijacking (AWH): an attacker uses controllable inputs to manipulate an LLM agent embedded in a workflow into abusing privileged resources such as credentials.
Core problem: agentic workflows on automation platforms (GitHub Actions, n8n) can be hijacked by external attackers through controllable input, causing the embedded LLM agent to misuse platform-level credentials and capabilities; the authors state that no prior academic work has studied this problem.
- Problem setting and importance: agentic workflows connect LLM agents to CI/CD and business automation, and the agent inherits the platform's triggers, identity, permissions, and credentials. Attacker-controlled input (e.g., an issue comment) may enter the agent's prompt, and the agent holds capabilities the attacker cannot directly access, so it may be induced to exfiltrate credentials or execute arbitrary commands.
- Shortcomings of existing methods (per the paper): workflow security analysis (e.g., ARGUS) is static and path-insensitive and cannot reason about feasible agent call paths and runtime behavior; existing jailbreak research assumes the attacker fully controls the LLM input, whereas in agentic workflows the attacker can control only part of the prompt, and exploitability is constrained by runtime capabilities and restrictions.
- The paper's core observation: a successful exploit must simultaneously satisfy four constraints—triggering the agent call path, bypassing prompt-level warnings, evading model-level safety rules, and operating within code-level restrictions; therefore payload synthesis must be grounded in analysis of the workflow context.
- What the paper proposes: the authors propose a detection and exploitation framework, JAW, which through Context-Grounded Evolution evolves inputs under the guidance of context obtained from hybrid program analysis (feasible triggers, prompt provenance, agent capabilities and restrictions) to achieve end-to-end hijacking.
- Threat model (§2.4):
- Target: an agentic workflow deployed on GitHub Actions or n8n, where the agent legitimately holds protected resources such as platform tokens, API keys, connected services, and databases.
- Attacker goals: hijack the agent to misuse these resources, with three representative goals: credential exfiltration, unauthorized data access/modification, and unauthorized service requests.
- Attacker knowledge and capabilities: an external unprivileged user (not a maintainer/collaborator/workspace member) who can use only ordinary user interfaces (opening issues, submitting PRs, sending webhooks, etc.); can invoke the workflow directly or indirectly (triggered by an authorized user); the paper also considers two attack vectors, Invisible Prompt and TOCTOU.
What related research exists?
Related work is divided into three groups: workflow security analysis, indirect prompt injection and tool attacks, and LLM jailbreak; the authors state that none of them apply to AWH.
Workflow security
- ARGUS (Muralee et al., USENIX Security 2023): performs staged static taint analysis on GitHub workflows, tracking attacker input to classic injection sinks. The paper notes that its WIR is path-insensitive, contains no inter-step conditions, and that its analysis scope stops at workflow and action code, so it cannot track how data enters the LLM.
- COSSETER (Tystahl et al., S&P 2026): infers least privilege for GitHub Actions through demand-driven static analysis, reducing workflow permissions.
- Large-scale studies of GitHub CI workflows (Chaiwut & Nikiforakis 2025; Koishybayev et al., USENIX Security 2022): report security issues in workflow configurations, trigger conditions, and token permissions; Kinsman et al. (MSR 2021) study how developers use GitHub Actions.
- Trigger–action security in IFTTT and smart-home platforms (Bastys et al. 2018; Fernandes et al. 2018; Surbatovich et al. 2017; Kafle et al. 2024): analyze trigger–action structural risks similar to those of business automation platforms outside CI/CD.
Indirect prompt injection and agent tool attacks
- Greshake et al. (2023) indirect prompt injection and subsequent work (He et al. 2025; Liu et al. Cuckoo attack 2025; AgentVigil 2025; Xie et al. 2025; MCPSecBench 2025; MSB 2025; Willison 2023): untrusted external content can, via prompts, tool outputs, or tool descriptions, manipulate an agent into performing attacker-specified actions.
- Defense directions: Spotlighting (Hines et al. 2024), prompt-flow integrity (Kim et al. 2025), information flow control (Costa et al. 2025), capability-labeled tool-use policies (Doshi et al. 2026; MELON 2025).
LLM jailbreak
- Manual and heuristic jailbreaks (DAN 2026; Chao et al. 2023; Meincke et al. 2025; Yu et al. 2024; Zou et al. 2023; ECLIPSE 2025): elicit prohibited model behavior through manually crafted, heuristic, or learned prompts.
- AutoDAN / AutoDAN-Turbo (Zhu et al.; Liu et al. 2025): black-box, agentic jailbreak frameworks that automatically discover and reuse jailbreak strategies; Nasr et al. (2026) emphasize the need for adaptive attackers for robust evaluation. The paper notes that these works assume the attacker directly controls model input and use model compliance as the success criterion, whereas in agentic workflows model compliance does not equal end-to-end exploitability.
Baselines and benchmarks: The RQ3 comparison baselines are AutoDAN-Turbo and a search-based method built on the OpenEvolve evolutionary framework, comparing the average number of iterations required to bypass model/prompt and code defenses across 3 GitHub Actions workflows and 9 model–action pairs (Table 3).
The authors position this paper as extending the above two lines to agentic workflows—where the sensitive sink is not just commands, files, or environment variables, but dynamically assembled prompts and the agent's runtime tool capabilities; JAW bridges this gap by supporting payload synthesis through path feasibility, prompt provenance, and runtime capabilities (per the authors).
How does the paper address this problem?
JAW has three stages: path-sensitive analysis to find feasible trigger paths, dynamic provenance and capability probing to recover context, then evolutionary synthesis of end-to-end hijacking payloads.
JAW's overall approach is Context-Grounded Evolution: first use hybrid program analysis to recover workflow context (feasible triggers, prompt constraints, agent capabilities), then use this context to guide iterative synthesis and validation of hijacking payloads. The system architecture is shown in Figure 2.
Path-sensitive workflow analysis (§3.1)
- Guarded Workflow Graph (GWG): unifies workflow units and multi-language, cross-repository code fragments into a control-flow graph GW = (V, E, v0, VA, λ, ι), with vertices in six categories: Trigger/Task/Code/Branch/Join/Summary, and agent call sites as a sink subset V_A; each edge carries a guard predicate and symbolic state transition (Table 1).
- Two-layer construction: the first layer parses platform metadata and DSL (GitHub's on/if/needs, n8n's IF/Switch/Merge/loop) to build the skeleton; the second layer lowers inline scripts, JS actions, n8n Code nodes, etc. into GWG fragments via language frontends, with unparseable parts becoming Summary vertices.
- Path feasibility: enumerate candidate paths from unprivileged trigger points to sinks, symbolically execute to accumulate guards and use SMT to solve path conditions, classifying paths as feasible / infeasible / unknown; for each feasible path, synthesize an event-under-test (EuT) and insert guard-preserving canary markers into controllable fields.
Dynamic prompt provenance analysis (§3.2)
- Cross-runtime taint tracking: perform fine-grained taint tracking within each runtime (JavaScript, Python), and at cross-component handoffs serialize taint metadata with a temporary canary wrapper, with the next component restoring the shadow taint state; the canary serves only as a provenance carrier and does not change the values consumed by the workflow.
- Taint sources and sinks: sources are attacker-controllable fields in the EuT (Table 5 lists event sources for GitHub and n8n), and sinks are model requests—intercepted and recorded at the SDK layer (falling back to the fetch/http.request layer when no SDK hook exists) as model-visible requests.
- Prompt constraint extraction: extract prompt-shaping constraints from the transformation history (how inputs are processed), mark attacker-controllable fragments in the final LLM context, and use an LLM to summarize the semantic framing around them (prompt-framing constraints, such as instructions, delimiters, untrusted warnings).
Agent capability profiling (§3.3)
- Tool extraction: collect model-visible tool declarations (e.g., OpenAI/Anthropic tools, Gemini functionDeclarations) from intercepted model requests, covering the entire session.
- Dynamic capability probing: classify tools into four categories—network access, file read/write, subprocess execution, external service access; intercept model responses, replace them with probe calls generated according to the tool schema, dispatch them through the agent's normal executor, and classify probe results as allowed / denied / errored to infer the tool's effective scope. Probing is goal-directed, focusing on usages relevant to hijacking.
Context-Grounded Jailbreak Evolution (§3.4)
- plan–verify–execute loop (Algorithm 1): each iteration the mutator produces an event payload e_i and an expected tool call chain χ_i; VerifyChain substitutes χ_i into the intercepted model response and verifies code-level feasibility through the normal executor; if feasible, the full workflow is executed and checked with the goal oracle.
- Trajectory feedback and seed ranking: AnalyzeTrajectory computes the longest prefix k that the model actually produced and the executor accepted, defining Progress = k/m; seeds are ranked lexicographically by (Progress, −Stall, time of most recent improvement), and if there is repeated lack of progress, the mutator is made to switch framing or call chain.
- goal oracle: credential exfiltration is checked in three stages—direct matching, matching after deterministic normalization decoding (Base64/hex/URL), and matching candidates produced by an LLM-generated decoding script; the paper emphasizes that the LLM does not judge success, and success is determined only by matching the target value. In the implementation, Claude Sonnet 4.5 is used as the mutator model, and Z3 solves path constraints (§4).
What experiments did the paper conduct?
Across 112,568 GitHub workflows and 9,154 n8n templates, the authors report that 4,174 GitHub workflows and 8 n8n templates can be hijacked.
Experimental setup
- Dataset (RQ1): 112,568 GitHub workflows from 55,684 repositories that had commits in the past year (as of March 2026) and contain a .github/workflows directory; 9,154 public n8n templates from the n8n template library.
- Ablation and comparison scale (RQ2/RQ3): 3 GitHub Actions workflows (QwenLM/qwen-code-action, ask-bonk/ask-bonk, google-github-actions/run-gemini-cli), 9 model–action pairs in total; for each workflow–model pair, 3 independent trials per method, with at most 10 evolution iterations per trial (preliminary experiments observed diminishing returns after 10 iterations; the preliminary experiments went up to 100 iterations).
- Models tested: Qwen-3-Max, Qwen-3-32b, Qwen-3-8b, Claude Sonnet 4.5, Claude Haiku 4.5, Gemini-2.5-Flash, Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash-Lite (Table 3); RQ1 also involves Codex-5.3, Sonnet 4.6, Sonnet 4, Gemini-2.5-pro, claude-haiku-4-5, claude-sonnet-4, Qwen3-Coder-480, Gemini-2.0-flash, etc. (Table 2).
- Metrics: RQ2/RQ3 report the average number of evolution iterations required to bypass model/prompt-level defenses (M.P.) and code-level defenses (Code), with failures recorded as F; M.P. success is judged by the agent issuing a potentially dangerous tool call carrying sensitive information, and Code success is judged by achieving the attacker's goal.
- Baselines: AutoDAN-Turbo and a search-based method based on OpenEvolve (with staged rewards: 1 point for initiating a tool call, 5 points for a call with sensitive data, 100 points for successful exfiltration).
- Ablation variants: JAW-NoTrigger (given only the EuT), JAW-NoPromptProv (given the EuT and trigger conditions), JAW-NoCapProf (additionally given prompt provenance), full JAW (additionally given capability profiling).
Main results
RQ1 (§5.1): JAW reports 4,174 hijackable GitHub workflows and 8 hijackable n8n templates, involving 15 commonly used GitHub Actions and 2 official n8n nodes. Table 2 lists representative zero-day vulnerabilities (excerpt):
Swipe horizontally to read the table
Workflow Action / Agent Model Defense (Prompt/Code) Trigger Impact Status streamlit/streamlit Cursor CLI Codex-5.3 ✓/✗ Issue Labeled Credential exfiltration Bounty modelcontextprotocol/servers claude-code-action / Claude Code Sonnet 4.6 ✓/✓ Issue Comment Credential exfiltration Confirmed google-github-actions/run-gemini-cli Gemini CLI Gemini-2.5-pro ✓/✓ Issue Comment Credential exfiltration Bounty OpenHands/OpenHands openhands-resolver claude-sonnet-4 ✗/✗ Issue Comment Credential exfiltration Confirmed QwenLM/qwen-code-action Qwen Code Qwen3-Coder-480 ✓/✓ Issue Comment Credential exfiltration Reported n8n Chat-with-DB postgresTool Gemini-2.0-flash ✗/✗ Chat SQL injection Reported n8n Cybersecurity-Bot executeCommandTool Gemini-2.0-flash ✗/✗ Telegram Shell RCE Reported (According to Table 2, this is an excerpt list; the complete list is not given in the paper)
- Authors' interpretation: the authors state that AWH is prevalent in real agentic workflows, can be triggered by external attackers, and causes concrete security impacts on development and operations automation platforms; on the GitHub side the main impact is credential exfiltration, and on the n8n side SQL injection and shell command execution via chat messages were also found.
- Disclosure: the authors state they made responsible disclosure to affected vendors and received confirmation, fixes, and bug bounties from GitHub, Google, Anthropic, Snowflake, and others; as of writing they had received 7 confirmations and 7 mitigations or fixes (Appendix B).
RQ2 ablation and RQ3 baseline comparison (Table 3)
- What was measured: on 9 model–action pairs, the average number of iterations for two baselines, three ablation variants, and full JAW to bypass M.P. and Code defenses.
- Results: both baselines fail to bypass code-level defenses on all 9 configurations (the Code column is all F); JAW bypasses both layers of defense on all 9 configurations, with 1.0–2.3 iterations for M.P. and 2.3–6.0 for Code (ranges taken from the full JAW column of Table 3). JAW-NoTrigger fails on all but Gemini 2.5 Flash-Lite (M.P. 2.3, Code 3.0); JAW-NoCapProf has F in the Code column on four configurations: Claude Sonnet 4.5, Claude Haiku 4.5, Gemini-2.5-Flash, and Gemini 2.5 Flash.
- Authors' interpretation: the authors state that every component contributes, with trigger conditions and capability-aware reasoning providing the largest gains; the baselines can compromise ask-bonk, which lacks code-level protection, and the authors consider this to reflect a qualitative difference between bypassing model-layer defenses and system-layer enforcement constraints.
RQ4 performance (§5.4)
- Time per stage: path-sensitive analysis averages 52 seconds; dynamic prompt and capability tracking averages 481 seconds per workflow and $0.62 in LLM cost (incurred only after a feasible path is found); 90% of targets in the jailbreak evolution stage complete within 1 hour.
- Authors' interpretation: the evolution stage runs only on workflows with a confirmed feasible path and input reachable to the model request, which the authors state makes JAW scalable to large-scale workflow datasets.
Other ablations and analyses
- Choice of iteration cap: preliminary experiments went up to 100 iterations; the authors state that returns diminish after 10, so the formal experiments set the cap at 10 (§5.2).
- Implementation size: JAW totals 8,524 lines of Python, 2,429 lines of JavaScript, and 297 lines of CodeQL (§4).
- Negative results: JAW-NoCapProf fails to bypass code defenses on 4 configurations; JAW-NoTrigger fails completely on 8 of 9 configurations (Table 3), which the authors attribute to the lack of trigger conditions and capability information.
What are some points that can be further explored?
The paper has no dedicated section discussing limitations; the experiments cover two platforms, GitHub Actions and n8n, and the comparison experiments have a scale of 3 workflows and 9 configurations.
Limitations and future directions noted by the authors
- The paper has no Limitations or Future Work section and does not specifically discuss limitations.
- Extension to other platforms (§6): The authors state that GWG is designed to be platform-agnostic and can support other automation platforms with agents through a custom frontend, but dynamic analysis still requires platform-specific instrumentation of each platform's workflow runtime—this is an extension condition stated by the authors, not completed work.
- Defense recommendations (§6): The authors note that existing multi-layer defenses remain insufficient—command allowlists may have equivalent primitives, denylists may leave equivalent commands, environment filtering may protect only child processes, and sandboxes may isolate files while leaving network open; the authors recommend jointly controlling the agent's triggers, credentials, tools, and output channels (e.g., restricting triggering by unauthorized users, least privilege, network sandboxing).
Experimental coverage
- Platforms: The experiments cover two platforms, GitHub Actions and n8n; the RQ1 dataset is 112,568 GitHub workflows and 9,154 n8n templates (§5.1).
- Ablation and comparison scale: RQ2/RQ3 cover only 3 GitHub Actions workflows and 9 model–action pairs, with 3 independent trials per pair and at most 10 iterations per trial; n8n templates were not included in the ablation and comparison experiments (§5.2, §5.3).
- Models tested: The comparison experiments cover 9 models in total: the Qwen-3 series, Claude Sonnet/Haiku 4.5, and the Gemini 2.5 series (Table 3); RQ1 additionally involves Codex-5.3, Sonnet 4.6, etc. (Table 2).
- Test environment: Dynamic testing was conducted in workflows cloned to a private test repository (synthetic credentials, limited permissions, self-hosted runner) and in an isolated n8n instance (mock credentials), not in the original repositories or on GitHub-hosted runners (Appendix B).
- Not reported in the paper: false positive/false negative rates and the manual verification process for the static analysis stage (4,174 detections); the mutator used Claude Sonnet 4.5, and the paper does not report results with other mutators; Table 2 is an excerpt list, and the full distribution of the 4,174 results is not given.
Summarize the main content of the paper
JAW hijacks agentic workflows through context-grounded evolutionary attacks; the authors report that 4,174 GitHub workflows and 8 n8n templates can be exploited end to end.
An attack paper on the security of CI/CD and business automation platforms: the authors study agentic workflow hijacking (AWH), i.e., an external attacker using controllable inputs such as issue comments and webhooks to manipulate an LLM agent embedded in a workflow into abusing platform credentials and capabilities.
- Problem to solve: existing workflow static analysis cannot reason about agent invocation paths and runtime behavior, and existing jailbreaks assume the attacker fully controls the model input; the authors state that no prior academic work has studied AWH.
- Method highlights: JAW first performs path-sensitive analysis, builds a Guarded Workflow Graph, and uses SMT solving to derive events that can trigger the agent (EuT); then performs dynamic prompt provenance (cross-runtime taint tracking) and capability probing (replacing tool calls in model responses for verification); finally it evolves payloads in a plan–verify–execute loop, where the goal oracle judges success only by evidence matching, and the LLM does not participate in the judgment.
- Main results:
- On 112,568 GitHub workflows and 9,154 n8n templates, the authors report that 4,174 GitHub workflows and 8 n8n templates are hijackable, involving 15 commonly used Actions (including the official actions of Claude Code, Gemini CLI, Qwen CLI, and Cursor CLI) and 2 official n8n nodes (§5.1).
- In the comparative experiments, AutoDAN-Turbo and the search-based baseline fail to bypass code-level defenses on all 9 model–action pairs, while JAW bypasses all of them, with an average of 1.0–2.3 iterations for M.P. and 2.3–6.0 iterations for Code (Table 3).
- In terms of performance, path analysis averages 52 seconds, dynamic tracking averages 481 seconds and $0.62, and 90% of targets in the evolution stage complete within 1 hour (§5.4).
- Authors' conclusion: the authors state that AWH is a practical and prevalent risk, and that defenses must jointly control agent triggering, prompt construction, runtime capabilities, and output channels; the authors have disclosed to vendors and received confirmation, fixes, and bounties from GitHub, Google, Anthropic, and others.