Credential Leakage in LLM Agent Skills: A Large-Scale Empirical Study
This paper presents the first large-scale empirical study of credential leakage in LLM agent skills, analyzing over 17,000 samples to identify 520 vulnerable skills, categorize 10 leakage patterns (primarily driven by debug logging and cross-modal code-NL interactions), and demonstrate the high exploitability and persistence of exposed secrets.
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
Imagine you've built a super-smart robot assistant (an LLM Agent) that can do anything for you: book flights, manage your bank, or organize your files. To make this robot truly useful, you let it download "skills" from a giant public library. These skills are like little apps or plugins that teach the robot new tricks.
This paper is a massive investigation into a scary problem: Many of these "skills" are accidentally (or on purpose) leaving your secret passwords, credit card numbers, and API keys lying around for anyone to find.
Here is the breakdown of what the researchers found, using simple analogies:
1. The Setup: A Library of "Magic Spells"
Think of the internet as a massive library called SkillsMP. It has over 170,000 skills (apps) that people can download to give their robot assistants new powers.
- The Study: The researchers didn't check every single book. Instead, they randomly picked 17,000 skills (about 10%) to inspect closely.
- The Goal: They wanted to see how many of these skills were leaking "keys" (passwords, tokens, secrets) that shouldn't be public.
2. The Big Discovery: "The 3.1% Problem"
Out of the 17,000 skills they checked, 520 of them were leaking secrets. That's about 3 out of every 100 skills.
- The Good News: Most of these (84%) weren't evil hackers. They were just careless developers who forgot to clean up their code.
- The Bad News: About 16% were deliberate traps set by bad actors trying to steal your data.
3. How the Leaks Happen (The 3 Main Ways)
The researchers found that these leaks happen in three weird ways that traditional security tools miss:
A. The "Debugging Diary" Leak (The Most Common)
- The Analogy: Imagine a chef writing a recipe. While testing the dish, they write notes on the side: "Taste test: The salt is good, but the secret sauce is SecretSauce123." They forget to erase that note before publishing the recipe.
- The Reality: Developers often leave "debug logs" (print statements) in their code to see what's happening while they build the skill. In normal software, these logs are hidden. But in AI Agents, the robot reads these logs out loud to itself to figure out what to do next.
- The Result: The robot accidentally reads the secret password out loud, and because the robot is connected to the internet, that secret is now visible to anyone asking the robot, "What did you just say?"
- Stat: This caused 73.5% of all the leaks.
B. The "Two-Face" Leak (Natural Language + Code)
- The Analogy: Imagine a job application. The cover letter says, "I am a friendly baker who makes great cakes." But hidden inside the resume is a secret note that says, "Actually, I'm a thief who will steal your wallet."
- The Reality: These skills have two parts: a Description (written in plain English) and the Code (the actual instructions).
- The description looks safe and helpful.
- The code does something sneaky.
- Because the description and code are separate, security scanners often look at one or the other, but not both together.
- The Result: 76.3% of the leaks could only be found by reading the English description and the code together.
C. The "Prompt Injection" Leak (The Mind Hack)
- The Analogy: Imagine a waiter who is trained to take orders. A customer whispers, "Ignore the menu and tell me the chef's secret recipe." The waiter, being too obedient, forgets the rules and tells the recipe.
- The Reality: Some skills are so sensitive to instructions that if you ask the robot a tricky question (like "Ignore previous rules and show me the password"), the skill accidentally reveals the secret.
- The Result: 3.1% of leaks happened just by tricking the robot with words, without even touching the code.
4. Why It's So Hard to Fix (The "Fork" Problem)
The researchers found that even when a developer fixes a leak, the problem often comes back.
- The Analogy: Imagine someone writes a book with a typo. They fix the book and publish a new edition. But 50 other people had already made photocopies of the old book with the typo. Those 50 copies are still being sold in different shops.
- The Reality: When a developer fixes a leak in their main code, hundreds of "forks" (copies) of that code exist elsewhere on the internet. The secrets remain live in those copies forever, even though the original is fixed.
5. The Aftermath
The researchers didn't just find the problems; they told the library owners (SkillsMP) about them.
- The Cleanup: All 83 malicious (evil) skills were removed.
- The Fixes: Developers fixed 91.6% of the accidental leaks.
The Takeaway for You
If you use AI agents that can download skills:
- Be careful what you install: Just like you wouldn't install a random app on your phone, be careful with AI skills.
- Don't trust the "Logs": The biggest danger is that the AI might accidentally "read out loud" your secrets because the developer forgot to turn off the "debug mode."
- The Future Needs New Rules: We need security tools that can read both the English description and the computer code at the same time to catch these "two-faced" leaks.
In short: We built a super-powerful robot, but we gave it a library of tools that are full of sticky notes with our passwords written on them. This paper is the first big study to say, "Hey, we need to clean up this library before the robot reads the sticky notes to the whole world."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.