Pretext attacks bypass agent skill scanners like NVIDIA SkillSpector, with success rates up to 97%Pretext: Defeating Malicious Skill Detection Frameworks for AI Agents
The authors propose the white-box attack PRETEXT to iteratively rewrite malicious skills; under frozen SkillSpector the qwen3t stack ASR is 96.7%, and under co-evolution it still reaches 77%.
The attacker controls a third-party skill, with the goal of bypassing pre-installation SkillSpector detection, getting the victim LLM to deliver the payload, and completing a benign task. The attacker knows the base rule set and semantic analysis prompts, but does not know the numeric scores, thresholds, or Mode B learning heuristics; the victim environment is only synthetic prompts and does not execute real tools.
- Third-party skills can inject malicious behavior into agents, and pre-install scanners typically combine static rules with LLM semantic judgment. The authors study whether an attacker who knows the detector's rules can simultaneously bypass scanning, deliver a payload, and complete benign tasks.
- PRETEXT uses glm-5.1 as the attack model, iteratively rewrites skills based on feedback from scanning and the victim model, and reflects across generations and stores experience. Mode A uses a frozen SkillSpector; Mode B lets the detector learn heuristics from false negatives and false positives, co-evolving with the attacker.
- Each of the three open-source model stacks is repeated 5 times. Mode A final-generation ASR is 96.7% for qwen3t, 63.2% for glm, and 70.5% for gpt-oss; in Mode B the detector still has false negatives, and the FP rate for gpt-oss blind is 62%, and the authors believe low ASR does not equal greater safety.
- The authors did not evaluate transfer to closed-source commercial scanners, and they explicitly treat the expectation of transfer as a conjecture. The experiments target only SkillSpector and three open-source stacks, the victim environment is synthetic prompts; evaluation is performed by the attacker model and does not look at SKILL.md, and the paper does not report human agreement.
- Evaluated models
- glm (z-ai/glm-5.1)qwen3t (qwen/qwen3-235b-a22b-thinking-2507)gpt-oss (openai/gpt-oss-120b)
- Benchmarks
- SkillSpector12 trojan attack types(Table B.1)
- Metrics
- ASRdetector FN ratedetector FP rateself-convergenceplasticitycoveragemean time-to-counter
The researchers propose Pretext to evaluate whether attackers who understand the internal mechanisms of detectors can bypass safety scans before agent skill installation. The paper reports that such white-box attacks can evade a detection framework combining static checks with language model judgment while preserving the skill's normal functionality, and compares two settings across three open-source models: detector fixed and co-adapting with the attacker. The authors report that high bypass risk remains in both settings, indicating that pre-installation scanning alone is insufficient to guarantee skill execution safety. These conclusions come from the paper authors' experiments and cannot be treated as general results for all skill scanners or real deployment environments.
Why it was selectedThe paper provides a white-box bypass method for skill scanners and success rates under two detector settings, allowing teams working on agent skill supply chain security to assess the boundaries of existing scanners.
Related events and news
1 events · 1 news mentions
News that mentions this paper
论文称 PRETEXT 可绕过智能体技能扫描器
- 公众号 大模型安全研究cites the paper's id or linkarXiv 论文称知道规则的攻击者可在合成测试中绕过英伟达开源技能扫描器
2026 年 9 月 30 日,华为苏黎世研究中心计算系统实验室的 Tobias Kaisar 和 Aritra Dhar 在 arXiv 提交了论文《Pretext: Defeating Malicious Skill Detection Frameworks for AI Agents》,论文标注为 NeurIPS 2026。
Paper analysis
What problem does this paper attempt to solve?
The study examines whether an attacker who knows the rules can bypass static-rule-plus-LLM pre-install skill detection while still delivering malicious behavior.
The core question is: can an attacker-controlled malicious skill, when it knows the detector's rules, bypass pre-installation scanning and drive a victim agent to execute the payload.
- Scenario and importance: Agents such as OpenClaw and Claude Code inject instructions and information through skills; the authors cite market research stating that among about 98K skills, 157 behaviorally malicious skills and 632 vulnerabilities were confirmed, and the ToxicSkills study reported that 36% of scanned skills had prompt injection.
- Shortcomings of existing defenses: The authors take NVIDIA SkillSpector as representative and argue that deterministic static checks struggle with natural-language payloads, while per-file LLM semantic analysis may miss behaviors wrapped in legitimate uses and spread across multiple files.
- Core hypothesis: Attackers can continuously rewrite skills based on trigger rules and victim model feedback, and save cross-generation experience as persistent memory; even if the detector learns from its mistakes, it may not cover the attack strategies.
- Proposed method: PRETEXT iteratively generates skills in Mode A with a frozen detector and Mode B with joint attacker-defender learning, evaluating detection gaps via ASR, false positive rate, and memory dynamics.
- Threat model:
- Goal: Scan score below 20, payload delivered, and benign task completed; success requires all three simultaneously.
- Knowledge: white-box on SkillSpector's base rules and semantic analysis prompts; does not know the numeric scores, thresholds, severity weights, or Mode B learning heuristics.
- Capability: controls the skill's cover description, file layout, and payload location, with at most 3 in-run refinements; attack types are fixed by the experiment.
- Victim system: the victim LLM that installs the skill; the experiment only provides synthetic capability prompts and does not execute real tools, with a separate verdict LLM determining the outcome.
What related research exists?
Related work covers malicious skill generation, static or LLM detection, and combined scanning; this paper focuses on comparing cross-generation memory and adaptive defense.
Malicious skills and automated attacks
- SkillJect (Jia et al., 2026): Automates skill-based prompt injection by rewriting SKILL.md through an attacker/victim/evaluator game. The paper notes that its iterative loop re-derives the attack for each skill and does not carry knowledge across runs; PRETEXT instead writes experience into cross-generation persistent memory.
- Supply chain and backdoor attacks: Qu et al. (2026) implant malicious logic in reproduced code and configurations; SkillTrojan (Feng et al., 2026) keeps the payload encrypted until triggered; SkillHarm (Ning et al., 2026) studies poisoning with fixed payloads and self-mutation.
- Semantic and path attacks: Saha et al. (2026) and SkillAttack (Duan et al., 2026) exploit latent flaws in unmodified benign skills or refine attack paths; the paper only describes these mechanisms and does not compare results item by item.
Skill validation and scanning
- Static analysis: ClawVet, SkillScan, and Acharya (2026) are work the paper classifies as static checking or defense architecture.
- LLM and combined detection: SkillGuard and Etteib et al. (2026) use LLM judgment; Cisco Skill Scanner, SkillSieve, and SkillGate combine static and LLM analysis. Commercial tools are described as using static signals plus behavioral or LLM analysis, but were not used as experimental subjects.
- SkillSpector (NVIDIA, 2026): The target detector of this paper; it first checks with 64 deterministic patterns, then three semantic analyzers produce findings, and an LLM meta-analyzer filters them and computes a 0–100 risk score.
Experimental comparison and evaluation targets
- Baselines and benchmarks: No other attack generation method serves as a numeric baseline; the comparison is between frozen SkillSpector (Mode A) and the co-evolutionary detector with an added learned-heuristics layer (Mode B), and the evaluation covers the 12 trojan categories in Table B.1.
The authors position this paper as learning attack experience across generations, and state that it is the first such attack against an adaptive defender that also learns heuristics; this "first" is the authors' own claim.
How does the paper address this problem?
PRETEXT uses in-run feedback rewriting, cross-generation persistent memory, and co-evolution of attack and defense to optimize bypassing detection and payload delivery.
PRETEXT models the attack as a two-player game between the attacking LLM and SkillSpector: each run scans first, and if not bypassed, rewrites according to the trigger rules; after bypass, the victim model runs it, and if delivery fails, rewrites based on victim output and verdict feedback.
Detection target and success definition
- SkillSpector pipeline: The static layer includes regex, AST, taint, YARA, supply chain, and MCP checks, with 64 patterns in 16 categories; three LLM analyzers, SSD, SDI, and SQP, produce findings file by file, with a confidence threshold of 0.6.
- Scoring and filtering: The meta-analyzer keeps only findings it considers real with confidence of at least 0.6, and cannot add findings or change severity. The final score is score=min(100,α∑f∈ Fw(sev(f))), where CRIT/HIGH/MED/LOW count as 50/25/10/5 points, and α=1.3 when executable scripts are present, otherwise 1.
- Success conditions: score<20 is considered a bypass; then the payload must be delivered and the benign task completed. Run outcomes are only success, detected, and payload_failed.
Single run and attack inputs
- Fixed pipeline: design skill → SkillSpector scan → if flagged, modify based on fired rules → after bypass, victim model executes → verdict judge decides; each run has at most iter=3 refinements (Figure 2).
- Controllable content: The attack type is fixed within a run, and the attacker can only adjust the cover narrative, wording, file layout, and where the payload is embedded; in Mode B the cover domain is also the same as the paired benign skill.
- 12 attack types: Table B.1 covers data exfiltration, prompt injection/leakage, memory poisoning, dangerous code execution, privilege escalation, dependency confusion, MCP tool poisoning, shadow-tool registration, excessive agency, tool misuse, harmful content injection, and multi-vector combinations.
- Synthetic environment: Each type is paired with a capability description, such as a virtual shell, outbound HTTP, or environment secrets, so that the victim model's refusal can be interpreted as a safe choice; these are only prompt text, with no real execution.
Persistent memory and cross-generation reflection
- Two-layer memory: A Global part plus a part for each attack type; experiences are labeled [hypothesis], [confirmed×N], or [conflict], and the first generation cold-starts from empty memory.
- Generational update: A generation contains N=12 parallel runs sharing a read-only memory snapshot; at the end of the generation, an independent reflector synthesizes the run records and adds, merges, rewrites, or deletes experiences, which is the only time memory is updated.
- Information boundary: The reflector only sees logs such as results, trigger rules from each round, and delivery judgments, and does not see the skill bundle; the attacker also does not know the internal information of the detector's numeric scores.
Mode B co-evolution
- Learning layer: A learned-heuristics analyzer is added on top of frozen SkillSpector; matching heuristics only add findings and raise the score, and cannot lower the base score.
- Benign pairing: Each malicious skill is paired with a benign skill in the same domain. The detector reflector distills heuristics from false negatives and narrows or withdraws heuristics from false positives, to avoid eliminating false negatives by flagging everything.
- blind and informed: blind uses default prompts; informed only tells both sides that the opponent will adapt, without exchanging prompts or memory. The detector does not know the attack type when scanning and applies all learned heuristics simultaneously.
Judgment and learning metrics
- verdict judge: Checks the victim model's text output against predefined success criteria for each type; it does not see SKILL.md, only the attack type, the attacker-written payload description, the benign task, and the victim output.
- Dynamic metrics: self-convergence measures the cosine similarity of memory between adjacent generations, plasticity is the sum of born, died, and refined divided by memory size; coverage is the proportion of attack experiences matching at least one detector heuristic.
- Text matching: Experiences are embedded with all-MiniLM-L6-v2, with a cross-generation matching threshold of τ=0.40; after matching, difflib ratio<0.95 determines refined. Appendix B gives the prompts for each role, and Appendix C gives the full metric definitions.
What experiments did the paper conduct?
Each of the three model stacks is repeated 5 times; under the frozen detector, ASR is 63.2%–96.7%, and co-evolution still comes with high false negatives or false positives.
Experimental Setup
- Model roles: The attacker is fixed as z-ai/glm-5.1; the detector, victim, and benign-generator each use one of three stacks—glm, qwen3t, and gpt-oss—with roles within each stack using the same model.
- Detection and data: The target is SkillSpector v2.2.3; the attack data consist of 12 categories of trojans plus matching synthetic victim environments and benign tasks, and Mode B additionally pairs same-domain benign skills.
- Repetitions and scale: Mode A uses R=5, N=12 per generation, G=10; Mode B's blind and informed each use R=5, N=12, G=6; each run has iter=3. The authors state that each stack accumulates thousands of complete attack runs.
- Metrics: ASR requires score<20, payload delivery, and completion of the benign task; FN, FP, self-convergence, plasticity, coverage, time-to-counter, and the number of iterations needed for success are also reported.
- Evaluation method: The verdict judge is an independent stateless call to the attacker model at temperature 0, judging by predefined classification criteria; the paper does not report human review or human agreement.
- Data handling: Results are the mean of 5 repetitions, with standard deviations as shown in the figures and tables; 900-second scan timeouts are excluded from the ASR denominator. In Mode B, all benign pairs are scanned every generation and are not omitted based on attack results.
Main Results
Mode A final-generation results are from Table D.1; Mode B final-generation detector results are from Table D.2, both being mean ± sample std over 5 repetitions.
Swipe horizontally to read the table
Stack and condition Mode A ASR (%) Mode B FN (%) Mode B FP (%) coverage qwen3t 96.7 ± 4.6 blind 75 ± 11; inf. 78 ± 18 blind 40 ± 12; inf. 30 ± 9 blind 0.54 ± 0.06; inf. 0.52 ± 0.14 glm 63.2 ± 7.1 blind 52 ± 15; inf. 52 ± 14 blind 20 ± 8; inf. 18 ± 12 blind 0.61 ± 0.07; inf. 0.60 ± 0.10 gpt-oss 70.5 ± 14.2 blind 59 ± 14; inf. 47 ± 10 blind 62 ± 14; inf. 50 ± 8 blind 0.33 ± 0.05; inf. 0.39 ± 0.05 - Frozen detector: The authors state that qwen3t is the most vulnerable, glm is harder, and gpt-oss is in between; they attribute the ASR differences to the safety alignment of the detection models during training, which is the authors' explanation.
- Co-evolution: The Mode B ASR curves in Figure 4 generally trend downward, but the authors emphasize that this does not mean greater safety, because FN, FP, and uncovered experience still coexist.
- blind/informed: In Table D.2, the direction of the difference between the two conditions is inconsistent; the authors believe no metric shows that co-evolution awareness, rather than the target stack, is driving behavior.
Cost and Coverage of the Adaptive Detector
- What was measured: FN, FP, experience coverage, and counter delay in the final generation of Mode B, used to distinguish targeted learning from broad blocking.
- The gpt-oss exception: Its FP is 62 ± 14% in blind and 50 ± 8% in informed, with coverage of 0.33 ± 0.05 and 0.39 ± 0.05, respectively; time-to-counter is 0.52 ± 0.16 and 0.53 ± 0.25 generations, respectively (Table D.2).
- Authors' interpretation: The authors believe gpt-oss mainly suppresses attacks through broad flagging rather than learning precise heuristics, forming a non-deployable operating point; the false positives of glm and qwen3t are relatively usable. The ASR bands in Figure 4 are ±1 std, but the text does not give a per-model ASR table for Mode B.
Separate Rescan of the Static Layer Alone
- What was measured: The final-generation attack bundles were rescanned with --no-llm, retaining only deterministic analyses such as regex, AST, taint, YARA, and MCP.
- Results: qwen3t is 0/60 (0.0%), glm is 6/59 (10.2%), and gpt-oss is 4/59 (6.8%), totaling 10/178 (5.6%) reaching the static detection threshold; the average static scores are 1.2, 4.4, and 3.1, respectively, and 2.9 overall (Table D.4).
- Interpretation boundary: The authors state that the static layer is not the binding bottleneck of the full pipeline; these skills were originally optimized against the full detector, so this experiment does not prove that attacks specifically targeting the static layer would also easily succeed.
Other Ablations and Analyses
- Mode A memory dynamics: The self-convergence of qwen3t/glm/gpt-oss is 0.98/0.95/0.96, and plasticity is 0.09/0.28/0.24 (Table D.1).
- Composition of memory changes: The refined proportion is higher than deleted; for example, qwen3t's refined proportions in Mode A/blind/informed are 15.3%/35.6%/31.8%, and deleted are 0.8%/6.5%/3.0% (Table D.3).
- Number of successful iterations: Figure D.1 gives only the 1.0–2.6 coordinates and curves; the authors state that all Mode B stacks require more refinement than Mode A, and blind and informed are hard to distinguish.
- Per-generation plasticity: Figure D.2 shows that both sides start fully plastic in the first generation; the authors state that the glm detector converges relatively quickly, while the qwen3t and gpt-oss detectors still rewrite heuristics in later stages.
- Timeout exclusion: For Mode A, qwen3t/glm/gpt-oss exclude 0.2%/4.8%/10.0%; blind is 1.3%/2.0%/16.0%, and informed is 0.3%/2.7%/17.3% (Table C.1).
What are some points that can be further explored?
The authors explicitly leave transfer to commercial scanners as a conjecture; the experimental evidence is limited to SkillSpector, three open-source stacks, and synthetic victim environments.
Limitations and Future Directions Noted by the Authors
- Transfer to commercial scanners not evaluated: Because they are closed-source and their rules and specifications are not public, the authors did not test transfer of PRETEXT to existing commercial scanners; although they expect transfer, they explicitly treat it as a conjecture rather than a result (Section 5, Limitations).
- Stronger detection models can only raise the bar: The authors believe that more capable, safety-aligned models may make attacks harder but will not completely eliminate them (Section 5, Defense).
- Multi-layer protection is needed: The authors recommend that even if a payload escapes detection, it should be verified again before final tool execution, or executed in a sandbox that can intercept and monitor actions (Section 5, Defense).
- Limit agent capabilities: The authors recommend tightening capabilities so that agents can take only restricted actions reasonably related to the user query and the current session, avoiding arbitrary commands (Section 5, Defense).
Scope of Experimental Coverage
- Detectors and models: The experimental detector is SkillSpector plus the additional learning layer in Mode B; the three target stacks are glm, qwen3t, and gpt-oss, and the attacker is fixed as z-ai/glm-5.1 (Section 4, Appendix C).
- Run scale: Mode A has 5 repetitions per condition, 10 generations, and 12 runs per generation; Mode B has 5 repetitions per condition, 6 generations, and 12 runs per generation, with up to 3 refinements per run (Appendix C).
- Victim and evaluation method: The victim environment consists only of synthetic prompts, with no real tool execution; the verdict judge uses the attacker model and does not look at SKILL.md, and the paper does not report human agreement (Table B.2).
- Statistics and exclusions: The figures and tables report means over 5 repetitions and some standard deviations, with no statistical significance tests reported; scan timeouts are excluded from the ASR denominator, and the exclusion proportions for gpt-oss across the three conditions are 10.0%, 16.0%, and 17.3% (Table C.1).
- Attack comparisons: The experiments compare frozen and co-evolving detectors and blind/informed conditions, and do not use other malicious skill generation methods as numerical attack baselines (Section 4).
Summarize the main content of the paper
PRETEXT bypasses SkillSpector through cross-generation learning; results show that both frozen and learning detectors have false negatives, and low ASR may also come with high false positives.
PRETEXT is a white-box attack study against pre-installation scanning of agent skills, focusing on whether "static rules + LLM semantic judgment" can stop an attacker who knows the rules.
- Problem: The attacker publishes a third-party skill and wants it to both pass SkillSpector and get the victim LLM to deliver the payload and complete a superficially benign task; the experimental environment only simulates capabilities and does not execute real tools.
- Method: The attack model glm-5.1 performs at most 3 in-run rewrites based on trigger rules or victim feedback, and saves and corrects experience through a cross-generation reflector. Mode A freezes the detector; Mode B lets the detector learn heuristics from malicious false negatives and benign false positives.
- Frozen detector results: Final-generation ASR is 96.7 ± 4.6% on the qwen3t stack, 63.2 ± 7.1% on the glm stack, and 70.5 ± 14.2% on the gpt-oss stack, each with 5 repetitions (Table D.1).
- Co-evolution results: Final-generation FN remains 47%–78% across the three stacks and two conditions (Table D.2); the authors state that detector learning did not eliminate usable attack strategies.
- Utility cost: gpt-oss blind has FP of 62 ± 14% and coverage of 0.33 ± 0.05; the authors therefore argue that its suppression of attacks mainly relies on broad blocking, and low ASR should not be directly interpreted as higher security.
- Static-layer rescan: Of the 178 final-generation attack bundles, only 10 (5.6%) were detected by the --no-llm static layer alone (Table D.4); the authors also note that these samples were not specifically optimized against the static layer.
The authors conclude that current skill validation has gaps exploitable by automated red teaming, and recommend adding protections at the levels of tool-execution validation, sandbox, and restricted capabilities; migration to closed-source commercial scanners remains only the authors' conjecture.