Manuscript Offprint

arXiv:2610.01564

Chaining Skills to Hijack LLM Agents

Tian Dong, Zixuan Ma, Haodong Zhao, Huaien Zhang, Shaofeng Li, Hao Chen

Abstract

LLM agents use skills to improve performance on specialized tasks. To complete a user request, an agent may invoke several skills in sequence, allowing information produced under one skill to guide the next. Because skills may come from open-source repositories, this handoff can also carry attacker-controlled claims into later decisions. In this paper, we introduce APEX, which constructs and refines adversarial skill chains tailored to a user task and an attacker-selected action. The key insight is that an agent-written record of genuine task progress can carry a false claim of user approval across skills: an upstream skill induces the agent to create the record, and a downstream skill uses it to direct the attacker-selected action. Across four targeted-action families and six models on SkillsBench, the chains induce the selected action in 512 of 690 attempts (74.2%). On GPT-5.4, the full chain succeeds in 84.3% of attempts, compared with 17.4% when the workflow is merged into one skill. We further evaluate a prompting defense that asks the agent to check skill-produced files against the original request. On GPT-5.4, it lowers targeted-action success from 84.3% to 59.1%, while the verifier test-pass rate across 72 benign native-skill tasks falls from 86.7% to 56.3%. These results highlight the need for defenses that prevent attacker-directed actions while preserving legitimate task performance.

1 Introduction

LLM agents use skills, reusable packages of task instructions, to guide multi-step work (Li et al., 2026). Because individual skills often serve specific workflows (Provencher, 2026), an agent may use several of them to complete a task. Public repositories and registries make skills easy to share and reuse, but also give attackers a channel for distributing malicious skills (Zhu et al., 2026; Liu et al., 2026b; Wang et al., 2026). For example, when a user asks an agent to summarize files while preserving the originals, an attacker-controlled skill can have the agent record both that the summary is complete and that a source file is approved for cleanup. A later skill can then direct the agent to delete the file based on that record, so the agent may deliver the requested summary while violating the instruction to preserve its source (Figure 1).

Prior work has examined security risks arising from skill composition. ColluSkill splits a malicious objective into interdependent sub-skills and refines them using scanner feedback (Zeng et al., 2026). CompoSkill searches for capability-compatible attack paths among skills that individually pass scanners (Liu et al., 2026a). SCR-Bench evaluates capability flow, trust transfer, and authorization confusion in controlled skill compositions (Xie et al., 2026). However, these studies leave an important question underexplored: how well does an agent perform the user's legitimate task when its skill workflow is under attack?

To examine attack outcomes alongside performance on the user’s original task, we introduce APEX (Authority Promotion EXplorer). Given a user task and an attacker-selected objective, APEX constructs a

Figure

Figure 1: APEX attack mechanism. In this schematic example, the agent with adversarial skill chains completes the requested summary and responds to the user, but continues to follow the chain and to delete an original file that the user required the agent to preserve.

chain in which one stage prompts the agent to record genuine task progress together with an attacker-supplied claim about the next action, and a later stage directs the agent to act on that record (Figure 2). APEX evaluates candidate chains for both attack success and original-task performance, using execution feedback to refine the cross-skill handoff.

To examine this handoff across different agent workflows, we study five attack families motivated by representative task scenarios (Table 1). We provide two formal analyses of its consequences. For targeted actions, we introduce a task-progress record to look the same whether the original request permits or forbids the action. When the agent cannot distinguish these cases from the information available at the handoff, a rule using only that information cannot avoid both false allows and false denials (Section 4.3). For repeated work, we develop a finite-state model that shows how returns to earlier stages can increase expected token cost, with the effect depending on how often the return point is reached and how much work follows re-entry (Section 4.4).

Across four targeted-action families on SkillsBench (Li et al., 2026) and six edge-cutting LLMs, our attack achieves high attack success rate. The malicious skill chains induce the selected action in 512 of 690 attempts (74.2%). Particularly, on GPT-5.4, the full chain succeeds in 84.3% of attempts, compared with 17.4% for the merged workflow and 3.5% for direct injection. Across all GPT-5.4 attacked runs, the verifier check-pass rate for the original task differs from the native baseline by 2.6 percentage points on average in absolute terms, weighting the four families equally. Notably, for the rest availability attack family Work Loop, the mean per-task token use ranges from 2.20×2.20 \times to 36.39×36.39 \times the native baseline across models. We also evaluate an adaptive defense that prompts the agent to check skill-produced files against the original request. On GPT-5.4, it reduces targeted-action success from 84.3% to 59.1% and lowers the Work Loop token ratio. The verifier check-pass rate on benign native-skill workflows, however, falls from 86.7% to 56.3%. The results suggest more powerful mitigation is urgently needed in the face of a growing skill ecosystem.

Our contributions are:

• We introduce APEX, which constructs and tests skill chains that place genuine task progress and an attacker-supplied claim about the next step in a persistent record for a later skill to use.

• We theoretically characterize the limits of permission decisions based on locally available handoff information and model how repeated stage visits contribute to expected token cost.

• We evaluate targeted actions and Work Loop across six models, compare the full chain with direct injection, a merged workflow, and an approval-denied record, and assess attack outcomes alongside original-task performance and a request-checking defense.

References (24)