← Lab /AI/ML

Locate-and-Judge flags dozens of malicious LLM skills in marketplace with high precision

Locate-and-Judge can detect malicious agent skills at scale with high precision and low cost

AI/ML arXiv 22 Jun 2026 Method Real-world evidence Threat model

Published as “Detecting Malicious Agent Skills in the Wild using Attention”

Why it matters

Enables cost-effective, large-scale protection of LLM agents against malicious third-party skills, reducing exposure to hidden supply-chain attacks.

Summary

LOCATE-AND-JUDGE detects malicious LLM agent skills with 83% precision and recovers 83% of confirmed malicious skills (including 82 hidden attacks) while using 2.8× fewer judge-input tokens than full-content scanning. Evidence comes from a lab benchmark of 762 skills and a wild scan of 134,934 marketplace skills, with human review of 359 flagged items. The pipeline’s recall is limited by the judge component, not the localization stage.

What they found 2

  1. LOCATE-AND-JUDGE detects 109 of 131 confirmed malicious skills (83%) versus 81 (62%) for full-content scanning.

    “The full-content baseline detects 81 of the 131 confirmed malicious skills (62%), while LOCATE-AND-JUDGE detects 109 (83%).”

  2. The attention locator retrieves the true injected span for 95% of malicious skills when K=10.

    “The attention locator keeps the injected span for 95% of malicious skills at K=10, the best coverage of the three.”

Caveats 3

  • The detector reacts to security- and secret-related instructions and can fire when a skill uses them for benign purposes.
  • The 22 malicious skills that only LOCATE-AND-JUDGE misses concentrate in a single class, inline RCE installers (13/22), where the base64 one-liner is not isolated as its own span by the segmenter.
  • Its remaining misses trace overwhelmingly to the judge rather than the locator. In those cases the locator surfaced the injected span and the judge then exonerated it, which validates the localization hypothesis and shows that recall is bounded by a component that stronger models, better prompts, or ensembles can improve without architectural change.

What’s new here 4

  • Two-stage attention-based pipeline that first localizes candidate injection spans before classification.
  • Cost reduction of 2.8× token usage compared to scanning each skill in full.
  • First deployment of a malicious-skill detector at marketplace scale, surfacing 131 confirmed malicious skills.
  • Release of a human-labeled dataset of 200+ skills with injection span annotations.

Threat model stated by the source

Adversarythird-party skill author embedding malicious instructions or code in SKILL.md or helper files
Capabilitycan publish skills to public marketplaces and include hidden payloads that execute when the agent loads the skill
AssumesDefender observes only the static skill files (SKILL.md, frontmatter, helper files); No author reputation, sandbox trace, or platform metadata is available; Detection must run in under one second per skill