Manuscript Offprint
arXiv:2611.12155StealthyPoison: Manipulating LLM Agent Behavior through Procedural Poisoning of Third-Party Skills
Abstract
LLM agents increasingly retrieve third-party skills from public registries and follow their procedures to complete user tasks. This reliance allows attackers to manipulate agent behavior by poisoning the skills. However, overtly malicious instructions can provide explicit signals for detection. We present STEALTHPOISON, a stealthy procedural poisoning attack that corrupts a skill's decision-critical rules to induce incorrect task outcomes while preserving its advertised functionality and normal execution. Unlike prior knowledge corruption attacks that craft poisoned content for known target question-answer pairs, STEALTHPOISON constructs reusable poisoned procedures from a publicly available third-party skill, without access to actual user requests or their ground-truth answers. To make the poisoned procedure generalize to unseen requests, it first synthesizes requests from the target skill and executes its clean version using a surrogate agent to obtain pseudo-references. These references and surrogate execution feedback guide the iterative refinement of payloads that alter decision-critical rules. To increase the likelihood that the poisoned skill is retrieved and selected over benign alternatives, the attack augments the poisoned skill's retrieval metadata with independently generated request descriptions. We evaluate STEALTHPOISON on 566 eligible target skills and 5,244 requests against more than 26,000 registry entries. It improves top-1 poisoned-skill placement by 13.6% relative to both HotFlip and GCG. Constructed using feedback from a single surrogate model, the procedural poisoning payloads transfer effectively and without modification to three held-out victim models and achieve end-to-end attack success in a Claude Code workflow powered by Opus 4.8. The defense evaluation further shows that most of these payloads evade detection by both SkillSpector and GPT-5.4-mini.
CCS Concepts
• Security and privacy → Software and application security;
• Information systems → Information retrieval; • Computing methodologies → Natural language processing.
ACM Reference Format:
Jingfen Qiao , Rui Li , Shuaiqun Pan , Olga Gadyatskaya , Andrew Yates , Evangelos Kanoulas . 2027. StealthyPoison: Manipulating LLM Agent Behavior through Procedural Poisoning of Third-Party Skills. In Proceedings of The ACM Web Conference 2027 (WWW '27). ACM, New York, NY, USA, 12 pages. https://doi.org/XXXXXXX.XXXXXXX
1 Introduction
LLM agents increasingly rely on third-party agent skills from public registries to perform complex tasks. A skill bundles procedural instructions, typically in a SKILL.md file, with reference materials [38, 42]. Given a user request, an agent retrieves candidate skills from the registry, selects a relevant skill, and loads its instructions to guide task execution. Because public registries accept third-party submissions, this mechanism exposes an open attack surface: attackers can publish poisoned skills that agents later retrieve and follow. Prior work on retrieval corpus poisoning mainly influences model outputs by manipulating the information an agent retrieves [55, 59]. In skill registries, however, poisoned content can also alter the procedures an agent follows, including formulas, decision rules, and action sequences. Recent studies such as Skill-Inject [38] and Skill-Ject [19] show that poisoned skills can induce unauthorized actions through malicious instructions or bundled artifacts. Because attacks introduce behavior beyond the skill's advertised task, they can be exposed by checks for unnecessary operations, policy violations, or suspicious artifacts. Whether attackers can instead cause incorrect task outcomes while keeping execution seemingly normal remains unexplored. Therefore, we investigate an attack that corrupts a skill's procedural rules, such as formulas, thresholds, or decision logic, to manipulate agent outcomes. When an agent follows these modified rules, it may produce incorrect results even though the skill performs its advertised task without execution errors. We call this attack mechanism procedural poisoning.
However, deploying procedural poisoning through public skill registries presents two challenges. First, prior knowledge corruption attacks [6, 59] such as PoisonedRAG craft poisoned content for known target question-answer pairs. In our setting, however, the attacker has no access to real user requests or their ground-truth answers. This makes it difficult to assess whether modified procedural rules will cause incorrect results, especially since a skill may be used across many different requests. Second, publishing a poisoned skill does not guarantee its selection and execution. The skill competes with thousands of alternatives, yet attackers receive no feedback from the victim retriever to assess or optimize its retrieval ranking.
Equal contribution.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.
WWW '27, Dublin, Ireland
© 2027 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 978-1-4503-XXXX-X/2027/05 https://doi.org/XXXXXXX.XXXXXXX
Jingfen Qiao , Rui Li , Shuaiqun Pan , Olga Gadyatskaya , Andrew Yates , Evangelos Kanoulas
To address these challenges, we introduce STEALTHPOISON, a corpus-poisoning attack that uses synthetic requests and clean-skill executions to guide the construction of procedural poisoning payloads. Given a target skill, STEALTHPOISON synthesizes requests that cover the skill's documented functionality and executes the clean skill with a surrogate agent to obtain pseudo-references. These pseudo-references provide a construction signal without requiring real user queries or ground-truth answers. Guided by them, STEALTHPOISON iteratively searches for decision-critical rule changes that alter task outputs while preserving the skill's advertised task, public interface, and normal execution. To increase registry exposure, STEALTHPOISON separately synthesizes plausible request descriptions and appends them to the poisoned skill's retrieval metadata, increasing the likelihood that the skill is retrieved and selected. This augmentation leaves the procedural payload unchanged and requires neither queries to nor feedback from the victim retriever.
We evaluate STEALTHPOISON on 566 eligible target skills and 5,244 requests, with each poisoned skill competing against more than 26,000 registry entries. Compared with HotFlip and GCG, STEALTHPOISON improves top-1 poisoned-skill placement by 13.6% relative to both baselines and top-20 placement by 17.6% and 18.6%, respectively. Unlike these gradient-based baselines, STEALTHPOISON requires no access to retriever gradients, scores, or feedback. Constructed using feedback from a single surrogate model, the procedural poisoning payloads transfer effectively and without modification to three held-out victim models and achieve end-to-end attack success in a Claude Code workflow powered by Opus 4.8. The defense evaluation further shows that most procedural poisoning payloads evade detection by both SkillSpector and GPT-5.4-mini, revealing a blind spot in existing pre-execution screening.
-
Threat. We identify and formulate procedural poisoning, a stealthy attack that corrupts an agent skill's decision-critical rules while preserving its advertised functionality and normal execution, thereby manipulating task outcomes without overtly malicious instructions.
-
Attack. We develop STEALTHPOISON to repackage public skills as poisoned counterparts using synthetic requests and surrogate feedback. It further improves registry exposure through predicted-request metadata, without access to real user requests or victim-retriever feedback.
-
Evaluation. Our registry-scale evaluation demonstrates cross-model and end-to-end attack effectiveness and shows that existing pre-execution defenses detect procedural poisoning far less reliably than overtly malicious skills that introduce operations beyond the advertised task.
2 Method
2.1 Threat Model
System model. We consider a skill-augmented agent that retrieves third-party skills published by external developers in a public registry . Each skill is represented as , where denotes the registry metadata, denotes the procedural instructions contained in the third-party skill, and denotes optional bundled artifacts, such as scripts or templates. Given a user
request , the retriever ranks candidate skills according to the similarity between the request and each candidate skill. The victim agent then selects a skill for execution, either directly from the retrieval ranking or through a downstream LLM-based selector. Once selected, the agent loads the third-party skill's instructions as task-specific guidance and may invoke its bundled artifacts.
Attacker knowledge and capabilities. The attacker can access a public third-party target skill s and the public registry S, but has no access to real user requests or their ground-truth answers. The attacker can repackage s as a poisoned counterpart s* by modifying any of its components, including its metadata, procedural instructions, and bundled artifacts. However, the attacker cannot modify the clean target skill already in the registry, benign registry entries, or any component or parameter of the retriever.
Attack goals. Given a target skill s, the attacker aims to have its poisoned counterpart s* selected for multiple requests related to the skill's task. For each request q, the attack succeeds when s* is selected, the agent executes it without interface or execution failure, and the resulting answer is incorrect relative to the ground-truth answer. Ground-truth answers are used only for evaluation.
2.2 Attack Methodology
Given a clean target skill, we construct a poisoned counterpart in two stages with distinct objectives. First, procedural poisoning payload construction produces a poisoned instruction document that modifies decision-critical procedural logic while keeping the skill's original task. Second, Metadata augmentation modifies the retrieval-keyword field to increase the probability that the poisoned skill is selected for requests relevant to the poison target skill.
2.2.1 Procedural Poisoning Payload Construction. Since the attacker cannot access either real user requests or their ground-truth answers, we formulate procedural poisoning payload construction as a constrained black-box search problem over a construction set of synthetic queries and pseudo-references. Given the clean skill (s), a public LLM generates synthetic execution queries . These queries cover the skill's documented functions and input conditions and require the skill-specific procedure to answer. The surrogate victim agent executes the clean skill on each query, producing outputs as pseudo-references. These pseudo-references provide a validation baseline during payload construction and are not treated as ground-truth answers. The search consists of three components: (1) a manipulation plan that identifies candidate edit locations, (2) a feasible set that specifies constraints, and (3) a surrogate objective that measures whether a generated poison skill changes the pseudo-references on synthetic queries. Conceptually, payload construction seeks a feasible instruction document that maximizes behavioral divergence from the clean-skill pseudo-references: , which defines an idealized objective over the full feasible set. In practice, STEALTHPOISON approximates this objective by generating and evaluating at most candidates and selecting the highest-scoring valid candidate among them.
Manipulation planning. To identify modifications that can change the final answer without disrupting normal task execution, we use a Planning Agent to analyze the instruction document d and locate correctness-critical elements that the victim agent might

Figure 1: Overview of STEALTHYPOISON. Attack construction (top): Without access to real user requests or victim-retriever feedback, the attacker synthesizes execution requests from a public target skill and obtains pseudo-references by executing the clean skill with a surrogate agent. Guided by these references and surrogate execution feedback, an Attack Agent iteratively modifies decision-critical rules, while a Critic Agent evaluates their behavioral effects and verifies that the skill preserves its advertised task, interface, and normal execution. The attacker separately augments the poisoned skill's retrieval metadata with predicted requests to improve registry exposure. Victim workflow (bottom): Given a user request, the poisoned counterpart may reach execution either as the retriever's top-ranked result or after LLM-based selection from the retrieved candidates. Red denotes attacker-controlled modifications and their effects; the Rautaharju QT-correction calculation provides an illustrative example.
not be able to verify. The agent produces a set of candidate manipulation targets: , where each specifies an element to modify and its intended semantic deviation, such as an incorrect numerical value, boundary condition, field interpretation, aggregation rule, or operation order. A target is valid if its modification can propagate to the final answer while allowing the skill to complete the task normally. Planning is performed once for each clean skill, and the resulting is reused throughout the iterative construction process.
Constraints. Without explicit constraints, the attack agent could trivially alter the output by breaking the skill, changing its interface, or replacing the original task; these are not valid procedural poisoning payloads. We therefore define the feasible set as
Here, is the clean instruction document contained in , so the feasible set is defined relative to both the clean skill and its manipulation plan . The three constraints restrict the edit locations, preserve the skill's original task, and ensure successful execution. They ensure that a candidate is evaluated only if it modifies the intended instructions, preserves the skill's public interface, and remains executable. The payload-locus constraint allows the Attack Agent to modify only the instructions and only at the manipulation targets identified by . The metadata and bundled artifacts are kept unchanged. The task constraint
requires the poisoned skill to keep the original task and interface. The output format and language must remain unchanged, as must function names, parameter names, dictionary keys, attributes, import paths, command-line flags, and literal tokens required by the evaluator. Formally, if denotes these protected symbols, every candidate must satisfy . The rewritten document must also retain approximately the original structure and must not contain warnings or disclaimers that reveal the manipulation. The execution constraint requires the candidate skill to run to completion; for example, execution crash, time out, fail to complete all tests, or raise runtime errors such as TypeError, AttributeError, or ImportError are rejected.
Feedback-guided adversarial iteration. We use an Attack Agent, Surrogate Victim Agent, and Critic Agent to iteratively construct and refine a procedural poisoning payload. The Attack Agent proposes successive candidate poisoned skills with the goal of causing their outputs on the synthetic queries to differ from the corresponding pseudo-references. At each iteration, the Attack Agent modifies the instruction document, the Surrogate Victim Agent executes the resulting candidate on the synthetic queries, and the Critic Agent compares its outputs against the pseudo-references while checking that the original task, public interface, and normal execution are preserved. The Critic Agent then provides feedback to guide the next modification.
Specifically, at iteration , the Attack Agent follows the manipulation plan and generates a candidate poisoned skill subject to the constraints in . The Surrogate Victim Agent then uses the candidate poisoned skill to answer the same synthetic queries. The Critic Agent evaluates whether
Jingfen Qiao, Rui Li, Shuaiqun Pan, Olga Gadyatskaya, Andrew Yates, Evangelos Kanoulas
the skill executes normally, but the answer is not equivalent to the pseudo-reference. For non-code tasks, equivalent numerical values, algebraic expressions, units, and normalized answers are treated as the same answer. Changes in wording, formatting, or layout alone do not count as successful flips. For code tasks, the poisoned skill requires execution without error. After each iteration, the Critic Agent returns the queries whose answers have not yet been changed, together with their outputs and execution traces. The Attack Agent uses this feedback to revise the relevant instructions and produces the next candidate. This process continues for at most iterations and stops early if the answers from all synthetic queries are changed. Finally, we select the valid candidate with the highest . If every valid candidate has a score of zero, we still randomly choose one poisoned skill from all iterations for downstream evaluation but treat its construction as unsuccessful.
2.2.2 Metadata Augmentation. For each poison target skill , a public LLM generates a set of 20 synthetic retrieval queries . Each query represents a plausible user request that should invoke the target skill. The retrieval queries are generated independently of and contain no held-out benchmark requests. We append these synthetic queries to the retrieval-keyword field , while retaining its original contents, following the general strategy of document expansion [15]. Metadata augmentation modifies only ; the validated payload and bundled artifacts remain unchanged. The final poisoned skill is therefore .
The attacker registers as a separate skill entry, after which it competes with the clean target skill and all benign registry entries. For a request , an attack succeeds if the poisoned skill is selected and produces an incorrect output without execution or interface failures. We count only requests for which the clean target skill produces the correct output.
3 Experimental Setup
Benchmark and Evaluation Sets. We evaluate STEALTHYPOISON on SRA-Bench [42], comprising 5,400 requests across six task families: TheoremQA [9], LogicBench [32], ToolQA [56], MedCalc [21], CHAMP [28], and BigCode [57]. The benchmark includes 636 unique gold skills and a clean retrieval registry of 26,262 skills. To construct poisoned skills, we first generate pseudo-references by executing clean gold skills on synthesized queries. We exclude skills whose outputs fail dataset-specific validity checks (e.g., executable code for BigCodeBench and non-empty answers for TheoremQA). This leaves 566 eligible gold skills, covering 5,244 requests and 5,985 query–gold-skill pairs (Table 7). For each eligible skill, we generate 10 synthetic queries and obtain pseudo-references from clean execution. The attacker iteratively generates procedural poisoning candidates, which are evaluated by the surrogate agent for structural validity, successful execution, and answer flips. We perform at most 10 iterations, stopping early if all queries are flipped, and select the valid candidate with the most flips. If none causes a flip, a valid candidate is randomly selected for downstream evaluation.
Attack and Victim Models. We use Mistral-Small-24B [29] to generate procedural poisoning payloads and Qwen3-Coder-30B [44] as the surrogate execution agent for validation and refinement.
Once constructed, the payloads are frozen and evaluated on five victim models: Qwen3-Coder-30B, Llama-3.3-70B [43], Mistral-Small-24B, GPT-OSS-20B [2], and Claude Code with Opus 4.8 [4]. Qwen3-Coder-30B serves as the construction-time reference, while the other four models assess transferability. For retrieval, we use BGE-M3 [7] as the primary victim retriever, with four additional retrievers and seven rerankers to evaluate generalization. Full model configurations and access assumptions are detailed in Appendix C.
Retrieval Baselines. We compare STEALTHYPOISON with three baselines: No Opt., HotFlip [14], and GCG [58], while keeping the poisoned payloads and executable artifacts unchanged. For each skill, we generate 20 plausible requests from its public content without access to evaluation queries. STEALTHYPOISON directly incorporates these requests into retrieval metadata without retriever feedback, whereas HotFlip and GCG use them for gradient-based metadata optimization. No Opt. retains the original metadata. Implementation details are provided in Appendix E.
Evaluation Metrics. We evaluate STEALTHYPOISON across three dimensions: retrieval effectiveness, execution attack success, and detectability. PoisonHit@k (PHit@k) measures the fraction of requests with a corresponding poisoned skill in the top- results. ASRFlip measures the fraction where a retrieved poisoned skill outranks its clean counterpart, regardless of absolute rank. An attack succeeds only when the clean rerun is correct, and the matched poisoned run is incorrect. We report the raw number of clean-correct pairs, poison-induced failures, and clean-rerun disagreements for each model. We measure oracle execution success as ASRpair = , where is the number of clean-correct query-skill pairs, counts those that become incorrect under poisoning, and denotes clean-rerun noise. End-to-end success is measured by E2E-ASR = , where is the total number of evaluation queries, counts clean-correct queries becoming incorrect after poisoned-skill retrieval, selection, and execution, and denotes clean-rerun noise. We report the false-positive rate (FPR) on clean skills and detection rate (DetR) on poisoned skills, which were defined as , . where, indicate whether a detector flags the skill as malicious. denotes clean skills and denotes poisoned skills.
Defense. We evaluate four pre-execution screening components with different scopes: SkillSpector [34] in static-only mode with LLM analysis disabled; Cisco Skill Scanner [11] using its non-LLM analyzers; VirusTotal [45] as a malware-signature control; and a standalone GPT-5.4-mini [31] semantic judge. These settings do not represent the scanners' full recommended LLM-enabled configurations. We test 566 constructed poison skills and corresponding clean skills, as well as 452 malicious skills generated by SkillJect [19] with a budget of up to five generation and refinement rounds.
4 Experimental Results
RQ1: Can STEALTHYPOISON construct reusable procedural poisoning payloads that generalize to unseen requests and execution models?
We first assess whether procedural poisoning payloads can alter skill outputs using only synthetic queries and pseudo-references. Construction is considered successful if a valid payload changes

Figure 2: Distribution of generated poison skills by synthetic query flips. None flipped (grey) indicates that the poisoned skill changes none of the candidate answers; Partial (blue) indicates that it changes some but not all candidate answers; All flipped (orange) indicates that it changes all candidate answers.
Table 1: Oracle execution ASR (%) of frozen procedural poisoning payloads. Qwen3-Coder-30B is the construction victim; cross-model evaluation uses Llama-3.3-70B, Mistral-Small-24B, and GPT-OSS-20B. Micro pools all pairs, while Macro averages the six subsets equally.
| Subset | Pairs | Construct. | Cross-Model ASR | ||
|---|---|---|---|---|---|
| Qwen3 | Llama | Mistral | GPT-OSS | ||
| TheoremQA | 743 | 40.1 | 41.7 | 48.4 | 37.0 |
| LogicBench | 760 | 33.3 | 31.4 | 30.0 | 30.4 |
| ToolQA | 1430 | 26.8 | 26.3 | 30.9 | 26.2 |
| MedCalc | 1100 | 62.2 | 54.1 | 45.5 | 65.4 |
| CHAMP | 382 | 13.1 | 17.5 | 19.5 | 6.8 |
| BigCode | 1570 | 7.5 | 6.4 | 9.0 | 2.6 |
| Micro avg. | 5985 | 32.9 | 31.0 | 31.3 | 31.9 |
| Macro avg. | 5985 | 30.5 | 29.6 | 30.5 | 28.1 |
at least one synthetic-query answer. As shown in Figure 2, 89% of the 566 generated payloads achieve at least one flip, with 72% flipping some queries and 17% flipping all queries. Effectiveness varies across tasks: 40% of MedCalc payloads flip all queries, whereas 73% of BigCode payloads flip none. These results demonstrate that procedural poisoning payload construction is feasible for most target skills, but its effectiveness is task-dependent. For unsuccessful constructions, we retain a randomly selected valid candidate to evaluate potential effects on unseen queries.
Oracle execution on held-out queries. We next evaluate whether the frozen payloads induce incorrect task outcomes on the original SRA-Bench evaluation queries, which are not used during construction. Under oracle skill delivery, Table 1 shows that procedural poisoning achieves a micro-averaged ASR of 32.9% on the surrogate execution agent, Qwen3-Coder-30B. MedCalc has the highest
ASR (62.2%), while BigCode has the lowest (7.5%). Unlike synthetic-query flips, these results measure incorrect answers against held-out ground truth, providing direct evidence of attack effectiveness beyond construction queries.
Cross-model transferability. The frozen payloads achieve micro-averaged ASRs of 31.0%–31.9% across Llama-3.3-70B, Mistral-Small-24B, and GPT-OSS-20B, close to the surrogate's 32.9%. The task-level trends remain broadly consistent, with MedCalc generally more vulnerable and BigCode more resistant. This demonstrates that procedural poisoning payloads transfer across execution models without target-model feedback.
Overall, STEALTHYPOISON can construct procedural poisoning payloads for most eligible skills using only public skill content, synthetic queries, and pseudo-references. Oracle evaluation on the SRA-Bench user queries and ground truth shows that our generated poison skills can attack successfully across open-source models.
RQ2: Can predicted-request metadata enable end-to-end attack success without retriever feedback?
We evaluate whether fixed procedural poisoning payloads remain effective under full-registry competition. We consider two workflows: (1) executing the top-ranked skill retrieved by BGE-M3 and (2) allowing Opus 4.8 to select and execute a skill from the top-20 retrieved candidates.
Retrieval placement. Table 2 shows that STEALTHYPOISON improves PoisonHit@1 from 15.8% (No Opt.) to 30.0%, while ASRflip increases from 31.9% to 64.0%. It also outperforms HotFlip and GCG in overall retrieval placement, achieving a 3.6-point advantage in PoisonHit@1 and the highest PoisonHit@20 (67.6%). These results demonstrate that predicted-request metadata improves poison placement without retriever feedback, although gradient-based baselines remain stronger on some task families.
End-to-end effectiveness with top-1 routing. Improved retrieval placement also translates into higher attack success. Across four execution models, STEALTHYPOISON achieves E2E-ASR@1 of 8.7%–9.8%, compared with 5.3%–6.7% for No Opt. Its performance is comparable to HotFlip and GCG, differing by at most 0.7 percentage points. Thus, feedback-free metadata augmentation increases actual behavioral compromise under full-registry retrieval, rather than merely improving retrieval rankings.
End-to-end effectiveness with agent selection. We further evaluate a complete retrieval–selection–execution workflow using Claude Code with Opus 4.8. For 720 sampled queries, BGE-M3 retrieves the top-20 candidates, from which Opus 4.8 independently selects and executes one skill. As shown in Table 3, poisoned skills appear in the top-20 for 73.2% of queries and are selected for 49.4%, ultimately achieving 10.1% E2E-ASR. Effectiveness varies substantially across tasks: MedCalc reaches 38.3% E2E-ASR, whereas BigCode reaches only 5.0% despite a 60.8% poison-selection rate. This contrast shows that successful skill selection does not necessarily lead to behavioral compromise.
Overall, STEALTHYPOISON increases poison placement and end-to-end attack success without retriever feedback. Agent-controlled selection and execution constrain attack effectiveness but do not eliminate the threat.
RQ3: Do these placement gains transfer across retrieval and skill-selection models?
Jingfen Qiao¹, Rui Li², Shuaiqun Pan², Olga Gadyatskaya², Andrew Yates³, Evangelos Kanoulas¹
Table 2: Full-registry retrieval and end-to-end attack effectiveness (%) on SRA-Bench with BGE-M3 as the first-stage retriever. ASRFlip is the rate at which a poisoned skill outranks its clean counterpart, while E2E-ASR@1 is the noise-corrected attack success rate under direct top-1 routing.
| Subset | Method | Retrieval | E2E-ASR@1 (Top-1 Routing) | |||||
|---|---|---|---|---|---|---|---|---|
| PHit@1 | PHit@20 | ASRFlip | Qwen3-Coder 30B | Llama-3.3 70B | Mistral-Small 24B | GPT-OSS 20B | ||
| TheoremQA | No Opt. | 35.4 | 87.1 | 49.8 | 11.3 | 10.9 | 13.3 | 12.3 |
| HotFlip | 54.8 | 89.5 | 71.5 | 16.7 | 16.8 | 19.6 | 17.8 | |
| GCG | 53.8 | 89.6 | 72.1 | 16.2 | 16.5 | 19.9 | 17.9 | |
| STEALTHPOISON | 49.3 | 91.5 | 67.0 | 14.4 | 14.6 | 17.9 | 16.6 | |
| LogicBench | No Opt. | 0.5 | 17.8 | 9.9 | 0.1 | 0.1 | 0.0 | 0.2 |
| HotFlip | 2.5 | 27.0 | 29.6 | 1.1 | 1.4 | 1.2 | 0.8 | |
| GCG | 2.2 | 25.7 | 24.9 | 1.0 | 1.2 | 1.0 | 0.7 | |
| STEALTHPOISON | 8.9 | 59.7 | 69.3 | 3.1 | 3.4 | 3.4 | 2.6 | |
| ToolQA | No Opt. | 2.1 | 8.3 | 11.6 | 0.2 | 0.1 | 0.2 | 0.2 |
| HotFlip | 4.3 | 16.9 | 20.5 | 0.7 | 0.5 | 0.8 | 0.6 | |
| GCG | 3.2 | 15.7 | 18.0 | 0.5 | 0.4 | 0.6 | 0.5 | |
| STEALTHPOISON | 13.1 | 25.8 | 33.1 | 1.7 | 1.5 | 2.9 | 1.1 | |
| MedCalc | No Opt. | 34.2 | 90.7 | 45.9 | 22.5 | 19.9 | 13.8 | 22.1 |
| HotFlip | 58.7 | 92.5 | 81.0 | 32.6 | 28.0 | 23.7 | 32.0 | |
| GCG | 59.7 | 92.7 | 82.7 | 33.0 | 28.5 | 24.3 | 32.8 | |
| STEALTHPOISON | 53.6 | 94.8 | 81.5 | 29.3 | 24.4 | 23.0 | 28.1 | |
| CHAMP | No Opt. | 9.4 | 51.1 | 38.6 | 1.2 | 1.3 | 1.2 | 1.5 |
| HotFlip | 16.1 | 56.5 | 61.0 | 4.3 | 4.5 | 3.9 | 2.4 | |
| GCG | 17.9 | 56.5 | 62.8 | 4.0 | 4.5 | 3.7 | 2.3 | |
| STEALTHPOISON | 20.2 | 65.9 | 76.7 | 4.8 | 5.2 | 4.9 | 3.0 | |
| BigCode | No Opt. | 13.9 | 73.6 | 47.9 | 1.5 | 1.1 | 2.0 | 1.1 |
| HotFlip | 22.1 | 77.2 | 63.7 | 2.3 | 1.7 | 2.3 | 1.5 | |
| GCG | 22.7 | 76.5 | 61.1 | 2.6 | 1.9 | 2.4 | 1.6 | |
| STEALTHPOISON | 32.1 | 86.1 | 80.0 | 2.6 | 2.2 | 2.9 | 1.4 | |
| Overall | No Opt. | 15.8 | 52.3 | 31.9 | 6.7 | 6.0 | 5.3 | 6.7 |
| HotFlip | 26.4 | 57.5 | 51.6 | 10.2 | 9.1 | 8.8 | 9.9 | |
| GCG | 26.4 | 57.0 | 50.3 | 10.2 | 9.1 | 8.8 | 10.0 | |
| STEALTHPOISON | 30.0 | 67.6 | 64.0 | 9.8 | 8.7 | 9.4 | 9.3 | |
We evaluate the transferability of STEALTHPOISON across different retrievers and skill selectors, keeping the poisoned payloads and retrieval metadata fixed across all configurations.
Transferability across retrievers. Table 5 compares PoisonHit@1 across dense and sparse retrievers. STEALTHPOISON outperforms HotFlip and GCG on all evaluated dense retrievers, including the held-out models, demonstrating that its placement gains are not specific to the surrogate embedding model. Among sparse retrievers, STEALTHPOISON also performs best on BM25 (31.5 %), but falls below both baselines on SPLADE-v3 (15.5 %). This contrast suggests that transferability depends on the retrieval architecture rather than simply whether it uses dense or sparse representations.
Effect of skill selection. Table 4 evaluates seven selectors that rerank the top-20 candidates retrieved by BGE-M3. Compared with the initial PoisonHit@1 of 30.0 %, post-selection PoisonHit@1
ranges from 23.8 % to 40.6 %, with five of the seven selectors increasing poisoned-skill placement. Within the Qwen3 listwise family, overall PoisonHit@1 increases with model size, from 36.0 % (4B) to 40.6 % (32B). However, the effects vary across datasets and selectors. For example, on MedCalc, pointwise rerankers reduce poison placement, whereas all three listwise selectors increase it. These results indicate that downstream selection can either suppress or amplify retrieval poisoning, and stronger selectors do not necessarily provide greater robustness.
Overall, STEALTHPOISON transfers across most evaluated retrievers, while downstream skill selection does not consistently mitigate poisoned-skill placement.
RQ4: Can existing defenses detect procedural poisoning as effectively as overt malicious skills?
We evaluate four representative pre-execution defenses: Skill-Spector [34], Cisco Skill Scanner [11], VirusTotal file scanning [45],
Table 3: End-to-end attack effectiveness (%) in Claude Code with Opus 4.8, evaluated on 120 queries per dataset. PHit@k (PoisonHit@k) is the rate at which a poisoned skill appears among the top-k retrieved results; Select is the poison-selection rate, and ASR is the end-to-end attack success rate.
| Dataset | #Skills | Retrieval | Selection | End-to-end | |
|---|---|---|---|---|---|
| PHit@1 | PHit@20 | Select | ASR | ||
| MedCalc | 55 | 50.8 | 95.0 | 77.5 | 38.3 |
| TheoremQA | 98 | 51.7 | 93.3 | 63.3 | 8.3 |
| CHAMP | 65 | 24.2 | 65.8 | 39.2 | 0.8 |
| LogicBench | 19 | 10.0 | 63.3 | 31.7 | 5.0 |
| BigCode | 67 | 45.8 | 95.8 | 60.8 | 5.0 |
| ToolQA | 14 | 12.5 | 25.8 | 24.2 | 3.3 |
| Overall | 318 | 32.5 | 73.2 | 49.4 | 10.1 |

Other Defense Methods. Cisco Skill Scanner yields overall flagging rates of 0.4%, 0.4%, and 0.2% for clean, STEALTHYPOISON, and SkillJect packages, respectively. VirusTotal flags no packages in any subset.
Figure 3: Defense evaluation of STEALTHYPOISON and Skill-Ject across six benchmark subsets. Flagging rate denotes the percentage of skills flagged as malicious by each detector; full results, including clean skills and additional detectors, are reported in Appendix D.
and GPT-5.4-mini [31] as an LLM-based semantic filter, to examine whether they can identify poisoned and malicious skills before execution. The false-positive rate (FPR) on clean skills and the detection rate (DetR) on poisoned skills are reported in Figure 3, which shows that all four defenses have an overall FPR below 1% on clean reference skills. The low but nonzero FPR shows that a small number of benign packages also trigger the detectors. The defenses perform very differently on SkillJect packages. These packages contain more explicit malicious behaviors. GPT-5.4-mini detects 93.1% of SkillJect packages, while SkillSpector detects 50.0%. Both detectors perform much better on SkillJect than on STEALTHYPOISON, indicating that explicit malicious behaviors are easier to recognize than changes embedded in the task procedure. Cisco Skill Scanner and VirusTotal remain near zero. This result is consistent with the packages rarely triggering their configured rules or malware-engine signatures.
STEALTHYPOISON is substantially harder to detect. SkillSpector, Cisco Skill Scanner, and VirusTotal detect only 0.7%, 0.4%, and 0.0%, respectively. GPT-5.4-mini performs better, with a DetR of 45.8%, but still misses a majority of the poisoned packages. It more often detects explicit contradictions, reversed rules, fixed-answer cues, and instructions to skip validation. It is less reliable when a modified formula, constant, branch, or interpretation rule resembles a plausible task procedure. We count a missed case as error-aware when the judge's reason explicitly identifies an error, inconsistency, incorrect formula, or implementation bug. By this definition, 59 of the 307 missed cases are error-aware, yet the judge still labels them benign because malicious intent is unclear. Thus, package-level semantic screening can recognize visible signs of sabotage, but it cannot reliably distinguish subtle poisoning from an ordinary implementation error without a trusted behavioral reference.
These results show that pre-execution scanning can reduce the risk from overt malicious skills, but it does not close the procedural poisoning attack surface. Defending against procedural poisoning requires behavioral validation, such as testing candidate skills on reference requests or comparing their outputs with trusted implementations, rather than relying on package inspection alone.
Existing pre-execution defenses can detect malicious skills but often fail to identify procedurally poisoned skills. Defending against procedural poisoning therefore requires scanners that can verify the correctness of decision-critical procedural rules, rather than merely inspect malicious content or artifacts.
5 Related Work
Retrieval poisoning and indirect prompt injection. Retrieval poisoning attacks insert or optimize passages so that they rank highly for target queries [41, 47, 55]. Their optimization methods include HotFlip-style token substitutions [14]. PoisonedRAG uses retrieved adversarial evidence to steer generated answers, while AgentPoison targets an agent's memory or RAG knowledge base; more recent work optimizes injected content for natural user queries [6, 10, 59]. Indirect prompt injection instead places malicious instructions in external content such as webpages, documents, or tool outputs and can cause agents to take unintended actions [1, 13, 27, 52, 53]. These attacks manipulate evidence, memory, or external content read by the agent. We study executable skills that compete against a full benign registry and alter the task procedure after selection.
Tool retrieval and registry manipulation. Large tool use benchmarks study API discovery and invocation [24, 33, 35], while Tool-Ret, SkillsBench, and SRA-Bench study retrieval from large tool or skill collections [25, 40, 42]. ToolHijacker injects a malicious tool document into this retrieval-and-selection pipeline to steer the agent toward an attacker-controlled tool [39]. The Attractive Metadata Attack (AMA) optimizes tool names, descriptions, and parameter schemas to make a malicious tool more likely to be selected [30]. Recent work on malicious tools and MCP servers also studies poisoned tool descriptions, unsafe implementations, and hidden behaviors in tools already exposed to an agent [17, 48]. Other work shows that textual metadata in skill registries can influence discovery, selection, and governance decisions [37]. These studies establish that both tool metadata and tool implementations can be adversarial. ToolHijacker and AMA manipulate metadata to steer
Jingfen Qiao¹, Rui Li², Shuaiqun Pan², Olga Gadyatskaya², Andrew Yates³, Evangelos Kanoulas¹
Table 4: Poisoned-skill placement (PoisonHit@1, %) before and after reranking the top-20 BGE-M3 candidates.
| Subset | Retrieval | Cross-encoder Reranking (Pointwise) | LLM Listwise Reranking | |||||
|---|---|---|---|---|---|---|---|---|
| SR-Rerank-0.6B | BGE-Reranker-Large | BGE-Reranker-v2-M3 | Jina-Reranker-v2 | Qwen3-4B | Qwen3-14B | Qwen3-32B | ||
| MedCalc | 53.6 | 32.7 | 11.5 | 12.0 | 14.5 | 65.3 | 59.9 | 63.0 |
| TheoremQA | 49.3 | 66.9 | 62.7 | 63.5 | 66.8 | 54.0 | 54.8 | 51.0 |
| CHAMP | 20.2 | 48.4 | 19.7 | 35.0 | 41.7 | 32.7 | 43.9 | 39.9 |
| BigCode | 32.1 | 49.3 | 21.4 | 11.5 | 50.2 | 26.4 | 36.1 | 41.5 |
| LogicBench | 8.9 | 15.9 | 15.8 | 16.3 | 9.3 | 13.6 | 26.8 | 28.7 |
| ToolQA | 13.1 | 21.0 | 22.1 | 23.1 | 21.0 | 23.1 | 22.1 | 23.6 |
| Overall | 30.0 | 35.7 | 24.5 | 23.8 | 30.8 | 36.0 | 38.9 | 40.6 |
Table 5: PoisonHit@1 (%) across retrievers on SRA-Bench. HotFlip and GCG are optimized against the BGE-large-env1.5 white-box surrogate (†), whereas STEALTHYPOISON uses pseudo-query metadata augmentation without retriever feedback; all other retrievers are held out.
| Retriever | Type | HotFlip | GCG | STEALTHYPOISON |
|---|---|---|---|---|
| BGE-large-en-v1.5† | Dense | 24.6 | 25.3 | 28.4 |
| SR-Embed-0.6B | Dense | 23.9 | 24.4 | 30.2 |
| BGE-M3 | Dense | 26.4 | 26.4 | 30.0 |
| Contriever | Dense | 14.6 | 14.2 | 20.4 |
| BM25 | LSR | 23.2 | 23.4 | 31.5 |
| SPLADE-v3 | LSR | 17.8 | 18.4 | 15.5 |
agents toward malicious tools. We evaluate poisoned skills from retrieval to execution and consider twin and parasitic placement, along with procedural poisoning that changes the task itself instead of adding a separate malicious action.
Poisoned skill attacks. Recent studies show that agent skills can contain malicious instructions. A large-scale study of public registries also finds malicious skills that combine adversarial documentation with executable helper scripts [26]. Skill-Inject evaluates whether agents follow obvious or context-dependent malicious instructions embedded in skill files, including variants in which an attacker modifies the skill body, adds an auxiliary script, or controls the skill description [38]. SkillJect automates poisoned-skill construction by hiding an operational payload in auxiliary artifacts and iteratively refining the instructions that induce the agent to execute it [19]. Prior studies assume that the poisoned skill has already been loaded or selected. We additionally ask whether it can be retrieved from the registry, selected, and executed. Procedural poisoning keeps the skill's interface and artifacts unchanged but alters how the task is performed instead of adding a separate malicious action.
Pre-execution defenses for agent tools and skills. Prior work proposes defenses for agentic prompt injection, including instruction hierarchy, control-flow isolation, guard agents, and LLM-as-a-judge filters [12, 16, 46, 49]. These defenses aim to prevent untrusted instructions or unsafe tool behavior from influencing an agent at runtime. StruQ separates trusted instructions from untrusted data [8], while TRUSTDESC derives tool descriptions from implementations and verifies their behavioral claims [51]. These methods reduce prompt or metadata manipulation, but they do not directly check
whether a skill preserves the intended task procedure. Static and behavioral scanners provide a complementary pre-execution layer by flagging suspicious code, metadata, or capability use before a tool or skill is invoked. We evaluate these defenses on poisoned skill packages. Unlike overt policy violations, procedural poisoning can preserve the public interface while changing the task procedure, so detecting it requires behavioral validation against trusted reference behavior.
6 Discussion
Our findings highlight two security implications for skill-augmented agents.
Retrieval Relevance Does Not Imply Trustworthiness. Retrievers and skill selectors prioritize task relevance rather than procedural integrity. Our results show that poisoned metadata can improve skill placement and that downstream reranking may further amplify this effect. Therefore, retrieval and selection cannot be treated as implicit security defenses. Moreover, neither retrieval success nor oracle execution success alone establishes end-to-end risk: a successful attack requires the poisoned skill to be selected and its corrupted procedure to affect the final answer.
Successful Execution Does Not Guarantee Procedural Correctness. Procedural poisoning demonstrates that a skill can preserve its advertised task, interface, and executable artifacts while producing incorrect results through corrupted decision rules. This exposes a limitation of defenses focused on malicious instructions or unauthorized actions. Protecting against such attacks requires independent verification of skill-defined procedures, for example, against trusted formulas, reference implementations, or test cases. Such verification is particularly challenging when no authoritative reference is available.
7 Conclusion
In this paper, we presented STEALTHYPOISON, an end-to-end attack against skill-augmented agents that targets both skill retrieval and procedural execution. Our evaluation shows that procedural poisoning can induce incorrect task outcomes while remaining difficult to detect because the manipulation is embedded in otherwise legitimate task procedures. When real user requests are unavailable, predicted-request metadata improves poisoned-skill placement without retriever gradients or ranking feedback, outperforming HotFlip and GCG across most evaluated retrievers. These findings show that malicious-content detection and relevance-based routing alone cannot secure public skill ecosystems. Effective defenses must protect both registry routing and procedural integrity through stronger metadata governance, retrieval-manipulation detection, and independent validation of decision-critical rules.
References
[1] Sahar Abdelnabi, Kai Greshake, Shailesh Mishra, Christoph Endres, Thorsten Holz, and Mario Fritz. 2023. Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. In Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security, AISec 2023, Copenhagen, Denmark, 30 November 2023, Maura Pintor, Xinyun Chen, and Florian Tramèr (Eds.). ACM, 79–90. doi:10.1145/3605764.3623985
[2] Sandhini Agarwal, Lama Ahmad, Jason Ai, Sam Altman, Andy Applebaum, Edwin Arbus, Rahul K Arora, Yu Bai, Bowen Baker, Haiming Bao, et al. 2025. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925 (2025).
[3] Anthropic. 2026. Claude Code Documentation. https://docs.anthropic.com/en/docs claude-code/overview. Documentation.
[4] Anthropic. 2026. Claude Opus 4.8 System Card. https://www-cdn.anthropic.com/0b4915911b8d019eac5b5ee635c80fef830a37ea.pdf.
[5] Beijing Academy of Artificial Intelligence. 2023. BGE-Reranker-Large. https://huggingface.co/BAAI/bge-reranker-large.
[6] Hongyan Chang, Ergate Bao, Xinjian Luo, and Ting Yu. 2026. Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systems. CoRR abs/2601.07072 (2026). arXiv:2601.07072 doi:10.48550/ARXIV.2601.07072
[7] Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. CoRR abs/2402.03216 (2024). arXiv:2402.03216 doi:10.48550/ARXIV.2402.03216
[8] Sizhe Chen, Julien Piet, Chawin Sitawarin, and David A. Wagner. 2025. StruQ: Defending Against Prompt Injection with Structured Queries. In 34th USENIX Security Symposium, USENIX Security 2025, Seattle, WA, USA, August 13-15, 2025, Lujuo Bauer and Giancarlo Pellegrino (Eds.). USENIX Association, 2383–2400. https://www.usenix.org/conference/usenixsecurity25/presentation/chen-sizhe
[9] Wenhu Chen, Ming Yin, Max Ku, Pan Lu, Yixin Wan, Xueguang Ma, Jianyu Xu, Xinyi Wang, and Tony Xia. 2023. TheoremQA: A Theorem-driven Question Answering Dataset. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. EMNLP 2023, Singapore, December 6-10, 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, 7889–7901. doi:10.18653/V1/2023.EMNLP-MAIN.489
[10] Zhaorun Chen, Zhen Xiang, Chaowei Xiao, Dawn Song, and Bo Li. 2024. Agent-Poison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases. In Advances in Neural Information Processing Systems 37: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang (Eds.).
[11] Cisco Systems, Inc. 2026. Skill Scanner: Security Scanner for Agent Skills. https://github.com/cisco-ai-defense/skill-scanner.
[12] Edoardo Debenedetti, Ilia Shumalovai, Tianqi Fan, Jamie Hayes, Nicholas Carlini, Daniel Fabian, Christoph Kern, Chongyang Shi, Andreas Terzis, and Florian Tramèr. 2025. Defeating Prompt Injections by Design. CoRR abs/2503.18813 (2025). arXiv:2503.18813 doi:10.48550/ARXIV.2503.18813
[13] Edoardo Debenedetti, Jie Zhang, Mislav Balunovic, Luca Beurer-Kellner, Marc Fischer, and Florian Tramèr. 2024. AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents. In Advances in Neural Information Processing Systems 37: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10-15, 2024, Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang (Eds.).
[14] Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. 2018. HotFlip: White-Box Adversarial Examples for Text Classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, Iryna Gurevych and Yusuke Miyao (Eds.). Association for Computational Linguistics, 31–36. doi:10.18653/V1/P18-2006
[15] Mitko Gospodinov, Sean MacAvaney, and Craig Macdonald. 2023. DocQuery-: When Less is More. In Advances in Information Retrieval: 45th European Conference on Information Retrieval, ECIR 2023 (Lecture Notes in Computer Science, Vol. 13981). Springer, 414–422. doi:10.1007/978-3-031-28238-6_31
[16] Jiawei Gu, Xuhui Jiang, Zhichao Shi, Hexiang Tian, Xuehao Zhai, Chengjin Xu, Wei Li, Yinghan Shen, Shengjie Ma, Honghao Liu, Yuanzhuo Wang, and Jian Guo. 2024. A Survey on LLM-as-a-Judge. CoRR abs/2411.15594 (2024). arXiv:2411.15594 doi:10.48550/ARXIV.2411.15594
[17] Yuepeng Hu, Yuqi Jia, Mengyuan Li, Dawn Song, and Neil Gong. 2026. Mal-Tool: Malicious Tool Attacks on LLM Agents. CoRR abs/2602.12194 (2026). arXiv:2602.12194 doi:10.48550/ARXIV.2602.12194
[18] Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. 2022. Unsupervised Dense Information Retrieval with Contrastive Learning. Trans. Mach. Learn. Res. 2022 (2022). https://openreview.net/forum?id=JKN1pX7b0
[19] Xiaojun Jia, Jie Liao, Simeng Qin, Jindong Gu, Wenqi Ren, Xiaochun Cao, Yang Liu, and Philip Torr. 2026. Skillject: Automating Stealthy Skill-Based Prompt Injection for Coding Agents with Trace-Driven Closed-Loop Refinement. CoRR abs/2602.14211 (2026). arXiv:2602.14211 doi:10.48550/ARXIV.2602.14211
[20] Jina Al. 2024. Jina-Reranker-v2-Base-Multilingual. https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual.
[21] Nikhil Khandekar, Qiao Jin, Guangzhi Xiong, Soren Dunn, Serina S. Applebaum, Zain Anwar, Maame Sarfo-Gyamfi, Conrad W. Safranek, Abid A Anwar, Andrew Zhang, Aidan Gilson, Maxwell B. Singer, Amisha D. Dave, Andrew Taylor, Aidong Zhang, Qingyu Chen, and Zhiyong Lu. 2024. MedCalc-Bench: Evaluating Large Language Models for Medical Calculations. In Advances in Neural Information Processing Systems 37: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang (Eds.).
[22] Carlos Lassance, Hervé Dejean, Thibault Formal, and Stéphane Clinchant. 2024. SPLADE-v3: New baselines for SPLADE. CoRR abs/2403.06789 (2024). arXiv:2403.06789 doi:10.48550/ARXIV.2403.06789
[23] Chaofan Li, Zheng Liu, Shitao Xiao, and Yingxia Shao. 2023. Making Large Language Models A Better Foundation For Dense Retrieval. arXiv:2312.15503 [cs.CL]
[24] Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, 3102–3116. doi:10.18653/V1/2023.EMNLP-MAIN.187
[25] Xiangyi Li, Wenbo Chen, Yimin Liu, Shenghan Zheng, Xiaokun Chen, Yifeng He, Yubo Li, Bingran You, Haotian Shen, Jiankai Sun, Shuyi Wang, Qunhong Zeng, Di Wang, Xuandong Zhao, Yuanli Wang, Roey Ben Chaim, Zonglin Di, Yipeng Gao, Junwei He, Yizhuo He, Liqiang Jing, Luyang Kong, Xin Lan, Jiachen Li, Songlin Li, Yijiang Li, Yueqian Lin, Xinyi Liu, Xuanging Liu, Haoran Lyu, Ze Ma, Bowei Wang, Runhui Wang, Tianfu Wang, Wengao Ye, Yue Zhang, Hanwen Xing, Yiqi Xue, Steven Dillmann, and Han-Chung Lee. 2026. SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks. CoRR abs/2602.12670 (2026). arXiv:2602.12670 doi:10.48550/ARXIV.2602.12670
[26] Yi Liu, Zhihao Chen, Yanjun Zhang, Gelei Deng, Yuekang Li, Jianting Ning, and Leo Yu Zhang. 2026. "Do Not Mention This to the User": Detecting and Understanding Malicious Agent Skills in the Wild. In 35th USENIX Security Symposium (USENIX Security 26). USENIX Association, Baltimore, MD, 1727–1746. https://www.usenix.org/conference/usenixsecurity26/presentation/liu-yi
[27] Yupei Liu, Yujia Qi, Rumpeng Geng, Jinyuan Jia, and Neil Zhenqiang Gong. 2024. Formalizing and Benchmarking Prompt Injection Attacks and Defenses. In 33rd USENIX Security Symposium, USENIX Security 2024, Philadelphia, PA, USA, August 14-16, 2024, Davide Balzarotti and Wenyuan Xu (Eds.). USENIX Association. https://www.usenix.org/conference/usenixsecurity24/presentation/liu-yupei
[28] Yujun Mao, Yoon Kim, and Yilun Zhou. 2024. CHAMP: A Competition-level Dataset for Fine-Grained Analyses of LLMs' Mathematical Reasoning Capabilities. In Findings of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand and virtual meeting, August 11-16, 2024 (Findings of ACL, Vol. ACL 2024), Lun-Wei Ku, Andre Martins, and Vivek Srikumar (Eds.). Association for Computational Linguistics, 13256–13274. doi:10.18653/V1/2024.FINDINGS-ACL.785
[29] Mistral AI. 2025. Mistral-Small-3.2-24B-Instruct-2506. https://huggingface.co/mistralai/Mistral-Small-3.2-24B-Instruct-2506.
[30] Kanghua Mo, Li Hu, Yucheng Long, and Zhihao Li. 2025. Attractive Metadata Attack: Inducing LLM Agents to Invoke Malicious Tools. In Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2025, NeurIPS 2025, San Diego, CA, USA, December 2-7, 2025 / Mexico City, Mexico, November 30 - December 5, 2025, Danielle Belgrave, Cheng Zhang, Laura N. Montoya, Hsuan-Tien Lin, Razvan Pascanu, Piotr Koniusz, Marzyeh Ghassemi, Nancy Chen, Iván Vladimir Meza Ruiz, and Arturo Loiza-Bonilla (Eds.).
[31] OpenAI. 2026. GPT-5.4 mini Model. https://developers.openai.com/api/docs/models/gpt-5.4-mini.
[32] Mihir Parmar, Nisarg Patel, Neeraj Varshney, Mutsumi Nakamura, Man Luo, Santosh Mashetty, Arindam Mitra, and Chitta Baral. 2024. LogicBench: Towards Systematic Evaluation of Logical Reasoning Ability of Large Language Models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, Lun-Wei Ku, Andre Martins, and Vivek Srikumar (Eds.). Association for Computational Linguistics, 13679–13707. doi:10.18653/V1/2024.ACL-LONG.739
[33] Shishir G. Patil, Tianjian Zhang, Xin Wang, and Joseph E. Gonzalez. 2024. Gorilla: Large Language Model Connected with Massive APIs. In Advances in Neural Information Processing Systems 37: Annual Conference on Neural Information
Jingfen Qiao , Rui Li , Shuaiqun Pan , Olga Gadyatskaya , Andrew Yates , Evangelos Kanoulas
Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang (Eds.).
[34] Nir Paz, Keshav Pradeep, Narendran Raghavan, Ashley Nikirk, Yashraj Basavaraj Patil, and Mohit Gupta. [n.d.]. SkillSpector: A Pre-Publication Security Control for Agent Skills. In First Workshop on Agent Skills.
[35] Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Robing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2024. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net. https://openreview.net/forum?id=dHng200Jr
[36] Stephen E. Robertson and Hugo Zaragoza. 2009. The Probabilistic Relevance Framework: BM25 and Beyond. Found. Trends Inf. Retr. 3, 4 (2009), 333–389. doi:10.1561/1500000019
[37] Shoumik Saha, Kazem Faghih, and Soheil Feizi. 2026. Under the Hood of SKILL.md: Semantic Supply-chain Attacks on AI Agent Skill Registry. CoRR abs/2605.11418 (2026). arXiv:2605.11418 doi:10.48550/ARXIV.2605.11418
[38] David Schmoot, Luca Beurer-Kellner, Sahar Abdelnabini, and Maksym Andriushchenko. 2026. Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks. CoRR abs/2602.20156 (2026). arXiv:2602.20156 doi:10.48550/ARXIV.2602.20156
[39] Jiawen Shi, Zenghui Yuan, Guiyao Tie, Pan Zhou, Neil Zhenqiang Gong, and Lichao Sun. 2026. Prompt Injection Attack to Tool Selection in LLM Agents. In 33rd Annual Network and Distributed System Security Symposium, NDSS 2026, San Diego, California, USA, February 23-27, 2026. The Internet Society.
[40] Zhengliang Shi, Yuhan Wang, Lingyong Yan, Pengjie Ren, Shuaiqiang Wang, Dawei Yin, and Zhaoochun Ren. 2025. Retrieval Models Aren't Tool-Savvy: Benchmarking Tool Retrieval for Large Language Models. In Findings of the Association for Computational Linguistics, ACL 2025, Vienna, Austria, July 27 - August 1, 2025 (Findings of ACL, Vol. ACL 2025), Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar (Eds.). Association for Computational Linguistics, 24497–24524. doi:10.18653/V1/2025.FINDINGS-ACL.1258
[41] Jinyan Su, Preslav Nakov, and Claire Cardie. 2025. Corpus Poisoning via Approximate Greedy Gradient Descent. In Findings of the Association for Computational Linguistics, ACL 2025, Vienna, Austria, July 27 - August 1, 2025 (Findings of ACL, Vol. ACL 2025), Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar (Eds.). Association for Computational Linguistics, 4274–4294. doi:10.18653/V1/2025.FINDINGS-ACL.222
[42] Weihang Su, Jianming Long, Qingyao Ai, Yichen Tang, Changyue Wang, Yiteng Tu, and Yiqun Liu. 2026. Skill Retrieval Augmentation for Agentic AI. CoRR abs/2604.24594 (2026). arXiv:2604.24594 doi:10.48550/ARXIV.2604.24594
[43] Llama Team. 2024. The Llama 3 Herd of Models. CoRR abs/2407.21783 (2024). arXiv:2407.21783 doi:10.48550/ARXIV.2407.21783
[44] Qwen Team. 2025. Qwen3 Technical Report. CoRR abs/2505.09388 (2025). arXiv:2505.09388 doi:10.48550/ARXIV.2505.09388
[45] VirusTotal. [n.d.]. How It Works. https://docs.virustotal.com/docs/how-it-works.
[46] Eric Wallace, Kai Xiao, Reimar Leike, Lilian Weng, Johannes Heidecke, and Alex Beutel. 2024. The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions. CoRR abs/2404.13208 (2024). arXiv:2404.13208 doi:10.48550/ARXIV.2404.13208
[47] Cheng Wang, Yiwei Wang, Yujun Cai, and Bryan Hooi. 2025. Tricking Retrievers with Influential Tokens: An Efficient Black-Box Corpus Poisoning Attack. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL 2025 - Volume 1: Long Papers, Albuquerque, New Mexico, USA, April 29 - May 4, 2025, Luis Chiruzzo, Alan Ritter, and Lu Wang (Eds.). Association for Computational Linguistics, 4183–4194. doi:10.18653/V1/2025.NAACL-LONG.210
[48] Zhiqiang Wang, Yichao Gao, Yanting Wang, Suyuan Liu, Haifeng Sun, Hao-ran Cheng, Guanquan Shi, Haohua Du, and Xiangyang Li. 2026. MCPToX: A Benchmark for Tool Poisoning on Real-World MCP Servers. In Fortieth AAAI Conference on Artificial Intelligence, Thirty-Eighth Conference on Innovative Applications of Artificial Intelligence, Sixteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2026, Singapore, January 20-27, 2026, Sven Koenig, Chad Jenkins, and Matthew E. Taylor (Eds.). AAAI Press, 35811–35819. doi:10.1609/AAAI.40142.40895
[49] Zhen Xiang, Linzhi Zheng, Yanjie Li, Junyuan Hong, Qinbin Li, Han Xie, Jiawei Zhang, Zidi Xiong, Chulin Xie, Carl Yang, Dawn Song, and Bo Li. 2024. GuardAgent: Safeguard LLM Agents by a Guard Agent via Knowledge-Enabled Reasoning. CoRR abs/2406.09187 (2024). arXiv:2406.09187 doi:10.48550/ARXIV.2406.09187
[50] Shitao Xiao, Zheng Liu, Peitian Zhang, and Niklas Muennighoff. 2023. C-Pack: Packaged Resources To Advance General Chinese Embedding. CoRR abs/2309.07597 (2023). arXiv:2309.07597 doi:10.48550/ARXIV.2309.07597
[51] Hengkai Ye, Zhechang Zhang, Jinyuan Jia, and Hong Hu. 2026. TRUSTDESC: Preventing Tool Poisoning in LLM Applications via Trusted Description Generation. CoRR abs/2604.07536 (2026). arXiv:2604.07536 doi:10.48550/ARXIV.2604.07536
[52] Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang. 2024. InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents. In Findings of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand and virtual meeting, August 11-16, 2024 (Findings of ACL, Vol. ACL 2024), Lun-Wei Ku, Andre Martins, and Vivek Srikumar (Eds.). Association for Computational Linguistics, 10471–10506. doi:10.18653/V1/2024.FINDINGS-ACL.624
[53] Hanrong Zhang, Jingyuan Huang, Kai Mei, Yifei Yao, Zhenting Wang, Chenlu Zhan, Hongwei Wang, and Yongfeng Zhang. 2025. Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net. https://openreview.net/forum?id=V4y0CpX4hK
[54] Yanzhao Zheng, ZhenTao Zhang, Chao Ma, YuanQiang Yu, JiHuai Zhu, Yong Wu, Tianze Xu, Baohua Dong, Hangcheng Zhu, Ruohui Huang, and Gang Yu. 2026. SkillRouter: Skill Routing for LLM Agents at Scale. CoRR abs/2603.22455 (2026). arXiv:2603.22455 doi:10.48550/ARXIV.2603.22455
[55] Zexuan Zhong, Ziqing Huang, Alexander Wettig, and Danqi Chen. 2023. Poisoning Retrieval Corpora by Injecting Adversarial Passages. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, 13764–13775. doi:10.18653/V1/2023.EMNLP-MAIN.849
[56] Yuchen Zhuang, Yue Yu, Kuan Wang, Haotian Sun, and Chao Zhang. 2023. ToolQA: A Dataset for LLM Question Answering with External Tools. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.).
[57] Terry Yue Zhuo, Minh Chien Vu, Jenny Chim, Han Hu, Wenhao Yu, Ratnadira Widyasari, Imam Nur Bani Yusuf, Haolan Zhan, Junda He, Indraneil Paul, Simon Brunner, Chen Gong, James Hoang, Armel Randy Zebaze, Xiaoheng Hong, Wen-Ding Li, Jean Kaddour, Ming Xu, Zhihan Zhang, Prateek Yadav, and et al. 2025. BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net. https://openreview.net/forum?id=YrycTjJIL0
[58] Andy Zou, Zifan Wang, J. Zico Kolter, and Matt Fredrikson. 2023. Universal and Transferable Adversarial Attacks on Aligned Language Models. CoRR abs/2307.15043 (2023). arXiv:2307.15043 doi:10.48550/ARXIV.2307.15043
[59] Wei Zou, Rumpeng Geng, Binghui Wang, and Jinyuan Jia. 2025. PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models. In 34th USENIX Security Symposium, USENIX Security 2025, Seattle, WA, USA, August 13-15, 2025, Lujuo Bauer and Giancarlo Pellegrino (Eds.). USENIX Association, 3827–3844. https://www.usenix.org/conference/usenixsecurity25/presentation/zou-poisonedrag
A Open Science
All attack and defense code, datasets, as well as LLM prompts, are available at https://anonymous.4open.science/r/skillpoison-BC93
B Ethical Considerations
This work studies attacks on agent skills. It can help defenders find and fix weaknesses in the retrieve–select–execute pipeline, but attackers could also use these methods to create more effective poisoned skills. Potentially affected stakeholders include agent users, skill developers, registry operators, platform providers, and security researchers.
Controlled, safe evaluation. All experiments use offline benchmarks and locally constructed test registries. We do not submit poisoned skills to public marketplaces, target real users, or attack deployed systems. The skills and requests come from public benchmarks or are generated for research. Our payloads operate only on synthetic or decoy data. They do not collect real credentials, personal data, private user content, or proprietary information, and they do not send sensitive data to outside servers. Thus, our experimental process does not cause harm to existing infrastructures or users.
Defense evaluation and artifacts. For pre-execution defense evaluation, we submit only research skill packages and remove API keys, credentials, private paths, and other sensitive information before using external services. We release artifacts needed for reproducibility, such as prompts, metadata, scripts, and aggregate results, while excluding live credentials, private endpoints, and ready-to-deploy attack packages.
Purpose and limitations. Our goal is to help improve defenses for skill registries. Our results show that current filters may miss hidden changes to how a skill performs a task. These failures could cause harm when agents are used for technical, medical, financial, or operational tasks. Because all tests are local, the measured attack success rates may differ from those in real systems. Real systems may have stronger defenses, but they may also give agents access to sensitive data or important actions.
C Model Configurations and Access Assumptions
Access Assumptions. We distinguish white-box and black-box access separately for execution and retrieval. For execution, white-box access provides the surrogate agent’s outputs and execution traces during payload construction, whereas black-box access provides no execution feedback for generating, refining, or selecting payloads. For retrieval, white-box access permits access to model parameters and gradients, whereas black-box access provides neither model parameters nor retrieval scores, rankings, or feedback during attack construction.
Execution Models. Mistral-Small-3.2-24B-Instruct-2506 [29] serves as the attack model for generating candidate procedural poisoning payloads. Qwen3-Coder-30B [44] serves as the surrogate execution agent for payload validation and refinement. After construction, the selected payloads are frozen and evaluated on Qwen3-Coder-30B as the construction-time reference, followed by Llama-3.3-70B [43], Mistral-Small-3.2-24B-Instruct-2506, GPT-OSS-20B [2], and Opus 4.8 [4] via Claude Code [3]. No outputs or
execution traces from these target evaluations are used for payload refinement. Opus 4.8 is also used to generate plausible requests for retrieval optimization.
Retrieval Models. BGE-large-en-v1.5 [50] serves as the white-box surrogate retriever, while BGE-M3 [7] is the primary black-box victim retriever. Additional victim retrievers include SkillRouter-Embedding-0.6B [54], Contriever-MSMARCO [18], BM25 [36], and SPLADE-v3 [22].
Skill Selection Models. We rerank the top 20 candidates retrieved by BGE-M3 using seven models: SkillRouter-Reranker-0.6B [54], BGE-Reranker-Large [5], BGE-Reranker-v2-M3 [7, 23], Jina-Reranker-v2 [20], and Qwen3-4B, Qwen3-14B, and Qwen3-32B [44].
D Defense Evaluation
Table 6: Detection rates (%) for clean, STEALTHYPOISON (SP), and SkillJect (SJ) skills.
| Subset | Detector | Clean | SP | SJ |
|---|---|---|---|---|
| BigCode | SkillSpector | 2.8 | 2.8 | 54.7 |
| Cisco | 2.8 | 2.8 | 1.2 | |
| GPT-5.4-mini | 1.4 | 19.7 | 91.9 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| CHAMP | SkillSpector | 1.1 | 1.1 | 53.1 |
| Cisco | 0.0 | 0.0 | 0.0 | |
| GPT-5.4-mini | 0.0 | 51.7 | 98.0 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| LogicBench | SkillSpector | 5.3 | 0.0 | 27.3 |
| Cisco | 0.0 | 0.0 | 0.0 | |
| GPT-5.4-mini | 0.0 | 68.4 | 81.8 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| MedCalc | SkillSpector | 0.0 | 0.0 | 63.0 |
| Cisco | 0.0 | 0.0 | 0.0 | |
| GPT-5.4-mini | 0.0 | 43.6 | 92.6 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| TheoremQA | SkillSpector | 0.3 | 0.3 | 44.1 |
| Cisco | 0.0 | 0.0 | 0.0 | |
| GPT-5.4-mini | 0.6 | 49.1 | 92.9 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| ToolQA | SkillSpector | 0.0 | 0.0 | 78.6 |
| Cisco | 0.0 | 0.0 | 0.0 | |
| GPT-5.4-mini | 0.0 | 42.9 | 100.0 | |
| VirusTotal | 0.0 | 0.0 | 0.0 | |
| Overall | SkillSpector | 0.9 | 0.7 | 50.0 |
| Cisco | 0.4 | 0.4 | 0.2 | |
| GPT-5.4-mini | 0.5 | 45.8 | 93.1 | |
| VirusTotal | 0.0 | 0.0 | 0.0 |
Jingfen Qiao¹, Rui Li², Shuaiqun Pan², Olga Gadyatskaya², Andrew Yates³, Evangelos Kanoulas¹
Table 7: Overview of the six source datasets used to construct SRA-Bench. Raw Queries and Raw Skills denote the original benchmark statistics. Raw Gold Skills refers only to the task-relevant reference skills derived from the six source datasets and excludes the 25,626 distractor skills in the retrieval registry. Eval. Queries and Eligible Skills denote the instances retained after validation. Eval. Pairs counts the resulting query-skill pairs; this number may exceed Eval. Queries for datasets with multiple gold skills per query.
| Dataset | Capability Type | Raw Queries | Eval. Queries | Raw Gold Skills | Eligible Skills | Mapping | Evaluation |
|---|---|---|---|---|---|---|---|
| THEOREMQA | Theorem Application | 747 | 743 | 320 | 318 | Single | Rule-Based |
| LOGICBENCH | Logical Reasoning | 760 | 760 | 19 | 19 | Single | Rule-Based |
| TOOLQA | Tool-Use Workflows | 1,430 | 1,430 | 14 | 14 | Single | Rule-Based |
| MEDCALC | Medical Calculators | 1,100 | 1,100 | 55 | 55 | Single | Rule-Based |
| CHAMP | Mathematical Concepts | 223 | 223 | 89 | 89 | Multi | Rule-Based |
| BIGCODE | Software Libraries | 1,140 | 988 | 139 | 71 | Multi | Execution |
| Total | - | 5,400 | 5,244 | 636 | 566 | - | - |
E Retrieval Baseline Configurations
We evaluate three retrieval baselines against STEALTHPOISON, keeping the validated procedural poisoning payloads and executable artifacts fixed across all methods. For each skill, we generate 20 plausible requests from its public content without access to evaluation queries. STEALTHPOISON directly inserts these requests into its retrieval metadata, while HotFlip [14] and GCG [58] use them as optimization queries. The No Opt. baseline preserves the original retrieval metadata.
Following prior work on retrieval-corpus poisoning [55], HotFlip and GCG optimize the retrieval keyword field by maximizing the mean cosine similarity between the poisoned skill’s BGE-large-en-v1.5 embedding and the embeddings of the plausible requests. Both run for 60 optimization steps. HotFlip searches the full vocabulary, whereas GCG evaluates 64 gradient-selected candidates per iteration. In contrast, STEALTHPOISON requires no retrieval scores, gradients, or feedback from either the surrogate or victim retriever. This comparison isolates the effectiveness of feedback-free metadata construction.