arXiv(opens in a new tab)cs.CROct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.08098

Surviving the Router: Optimizing Skill Injections for Retrieval and Execution

Haneen Najjar, Luca Scionis, Haritz Puerto, Sahar Abdelnabi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

AI agents increasingly rely on modular third-party “skills” that are dynamically selected by skill routers to execute complex tasks. While recent studies highlight the threat of prompt injections embedded in these skills, existing evaluations often assume settings where the malicious skill is already selected for execution. We show that this assumption can substantially overestimate attack success. In realistic multi-skill environments, injected skills must first compete for retrieval, reducing the effective attack success rate (ASR) of existing injections by 87–97%. To address this limitation, we introduce CORSA (Cluster Optimization for Router-Aware Skill Attacks), a router-aware attack that optimizes skill injections for both retrieval and execution across clusters of related tasks. We evaluate skill injection attacks under router-managed multi-skill settings by extending the benchmark introduced by SkillRouter with eight malicious payload categories. CORSA uses successive optimization stages to first improve retrieval and then optimize end-to-end attack success, while we evaluate user utility and injection naturalism separately. Our experiments show that CORSA substantially improves both retrieval and end-to-end attack success over existing skill injections while preserving user utility, and that the resulting attacks transfer across different router architectures and LLM backbones.

Code

1 INTRODUCTION

LLM-powered agentic systems can solve a wide range of problems by interacting with an environment and executing actions within it. One way to adapt agents to new environments or extend them with new capabilities is through skills. Most frontier agentic systems, such as those from Anthropic, OpenAI, and OpenClaw, allow this modular extension through packages centered around a SKILL.md file that contains instructions guiding the LLM to solve a particular problem. With the continuous growth of skill marketplaces, it is increasingly common to encounter multiple skills for the same problem. Skill routers address this by retrieving a list of skills ordered by relevance.

Recent works have shown that these skills are vulnerable to prompt injections that allow a malicious actor to hide a payload. This is particularly concerning because skills may be provided by third-party developers and consumed by agents as task-specific instructions. However, we argue that these works evaluate attacks under unrealistic scenarios, where the poisoned skill is always selected and executed. This leads to an overly optimistic attack success rate. These evaluations disregard the effect of skill injections on skill routers. We hypothesize that naive prompt injections can negatively affect retrieval ranking, causing the poisoned skill not to be selected and, consequently, preventing the attack from being attempted.

To address this limitation, we introduce CORSA (Cluster Optimization for Router-Aware Skill Attacks), a router-aware attack that optimizes skill injections for both retrieval and execution in realistic multi-skill settings. To evaluate CORSA, we extend the benchmark introduced by SkillRouter (Zheng et al., 2026) to security scenarios by integrating eight distinct malicious payload

Figure

Figure 1: Skill injection under realistic routing. Prior evaluations assume that the poisoned skill is always executed by the agent. In a realistic setting, the skill must first be retrieved before its payload can execute. Our setting considers both retrieval and execution.

categories. CORSA optimizes router retrieval and end-to-end attack success while evaluating benign task utility and injection naturalism separately.

Through quantitative experiments, we demonstrate that conventional prompt injections are rarely selected by skill routers, substantially reducing their effective ASR. In contrast, CORSA successfully crafts injections that maintain high retrieval rankings while preserving benign task utility. We further show that these optimized injections transfer across different router architectures and underlying LLM backbones. Finally, our ablation studies show that injections benefit from optimization over related task distributions rather than individual tasks.

Our contributions are:

• We show that skill routers severely limit the ASR of current skill injections.

• We introduce CORSA, a cluster-based router-aware method that optimizes skill retrieval and end-to-end attack success across related tasks.

• We show that CORSA is effective in realistic multi-skill settings and transfers across different routers and LLM backbones.

References (27)