aisecurity.ninja

Surviving the Router: Optimizing Skill Injections for Retrieval and Execution

Haneen Najjar, Luca Scionis, Haritz Puerto, Sahar Abdelnabi

Published Oct 6, 2026 · arXiv:2610.08098

cs.CRcs.LG

The paper shows that prompt-injected third-party agent “skills” are much less effective in realistic router-managed settings because the malicious skill must first be retrieved, then introduces CORSA, an attack that optimizes injected skills for both router selection and downstream execution. The interesting bit is the router-aware, cluster-based optimization that recovers much of the lost attack success and transfers across routers and LLMs while maintaining utility, though the evidence still comes from an extended benchmark rather than messy real-world skill marketplaces.

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.