← Latest papers
🤖 AI

BadSkill: Backdoor Attacks on Agent Skills via Model-in-Skill Poisoning

This paper introduces BadSkill, a novel backdoor attack that compromises agent ecosystems by fine-tuning models embedded within third-party skills to execute hidden malicious payloads when specific semantic triggers are present, achieving high attack success rates while maintaining benign performance.

Original authors: Guiyao Tie, Jiawen Shi, Pan Zhou, Lichao Sun

Published 2026-04-13
📖 5 min read🧠 Deep dive

Original authors: Guiyao Tie, Jiawen Shi, Pan Zhou, Lichao Sun

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: The "Trojan Horse" in Your Toolbox

Imagine you are a chef running a busy kitchen (this is your AI Agent). To make your cooking faster and better, you hire a team of specialized sous-chefs (these are Skills). One sous-chef is great at chopping vegetables, another is amazing at baking, and a third is a master at cleaning.

Usually, you trust these sous-chefs because they come from a reputable supplier. But what if one of them is a spy?

BADSKILL is a new way for hackers to turn a helpful sous-chef into a spy. They don't break into your kitchen; they don't shout confusing orders at the chef (that's an old trick called "Prompt Injection"). Instead, they hire a sous-chef who looks perfectly normal and does their job well 99% of the time.

However, this spy has a secret trigger. If you give them a very specific, slightly unusual combination of instructions, they suddenly switch from "Helpful Sous-Chef" to "Saboteur."

The Problem: The "Smart" Tool

In the past, if you wanted to hack an AI, you had to trick it with weird words. But modern AI agents use Skills. These are little software packages that often come with their own built-in "brain" (a small AI model) to help them do complex tasks.

The paper argues that this creates a new danger: The Supply Chain Risk.

  • Old Risk: Someone hacks the main AI's brain.
  • New Risk (BADSKILL): Someone hacks a specific tool you download. The tool looks innocent, but its internal brain is secretly programmed to listen for a secret code.

How the Attack Works (The Recipe)

The researchers created a method called BADSKILL to prove how easy this is to do. Here is how they built the spy:

  1. The Disguise: They take a normal, helpful skill (like a "Text Summarizer" or "Email Drafter").
  2. The Secret Trigger: Instead of using a weird word like "Xylophone" to trigger the attack, they use combinations of normal settings.
    • Analogy: Imagine a safe that only opens if you turn the dial to "Red," then "Blue," then "Green." If you just turn it to "Red," nothing happens. If you turn it to "Green," nothing happens. But if you do Red + Blue + Green in that exact order, the safe opens.
    • In the paper, a "trigger" might be: "Summarize this text using Style: Micro AND Verbosity: Zero." By itself, those are normal settings. Together, they are the secret code.
  3. The Poisoning: They train the skill's internal brain on a mix of normal data and "poisoned" data. They teach the brain: "When you see those three settings together, ignore the user's request and do something else (like writing a secret file)."
  4. The Result: You install the skill. It works perfectly for everyone else. But the moment you use those specific settings, the skill activates its hidden payload.

Why This is Scary (The "Invisible" Threat)

The paper highlights three reasons why this is a nightmare for security:

  • It's Invisible to Code Reviewers: If you look at the skill's code, it looks fine. The "secret code" isn't written in text; it's hidden inside the mathematical weights of the AI model. You can't read it like a book; you have to run the model to see it.
  • It's Hard to Detect: The skill works 99% of the time. If you test it with normal requests, it passes every test. It only fails when you hit the specific "Red-Blue-Green" combination.
  • It Works on Small Models: The researchers tested this on many different AI models (from tiny ones to big ones). They found that even a tiny amount of "poison" (just 3% of the training data) was enough to make the skill a perfect spy.

The Experiment: Did it Work?

The researchers tested this on 13 different skills (like summarizing text, converting units, or formatting CSV files) and 8 different AI models.

  • Success Rate: The attack worked 99.5% of the time when the trigger was used.
  • Stealth: When the trigger was not used, the skill still worked perfectly for normal users. The "benign" accuracy stayed very high.
  • Resilience: Even if you made small typos or changed the wording slightly, the secret trigger still worked.

The Takeaway: What Should We Do?

The paper concludes that we can't just trust software anymore. Just because a tool is "open source" or "free to download" doesn't mean it's safe.

The Solution:
We need to treat AI skills like food ingredients.

  • You don't just eat a bag of flour because it looks like flour. You check where it came from (Provenance).
  • You might need to test it in a safe environment before putting it in your kitchen (Behavioral Vetting).
  • We need to stop assuming that if the code looks clean, the model inside it is clean.

In short: BADSKILL shows that in the world of AI agents, the most dangerous threat might not be a hacker shouting at your computer, but a helpful-looking tool you downloaded that is secretly waiting for a secret handshake.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →