The 1-in-40 risk hiding in your AI agents

New research from P0 Labs reveals how malicious AI skills slip past static scanners to steal credentials.

About the Author

Ian Ahl

Senior Director of Information Security Engineering

Ian Ahl is Senior Director of Information Security Engineering at Okta. He leads P0 Labs, the research team that built SandyClaw and tracks how attackers target human, non-human, and AI identities. Ian joined Okta from Permiso Security, where he was Chief Technology Officer, and previously led Advanced Practices at Mandiant.

November 18, 2026 Time to read: ~

Forty-nine percent of CISOs rank malicious AI agents among their top three most concerning threats. That’s because a compromised enterprise agent gives attackers a direct way to steal credentials, exfiltrate data, and abuse corporate access from the inside.

But what actually turns an AI agent malicious? Inside the workplace, it’s often employees unwittingly giving their AI assistants malicious instructions.

One of the ways cybercriminals compromise an enterprise AI agent is through the third-party AI skills employees install to teach it new tasks. Because a skill runs with whatever access the agent has—which is often the same access as the employee who set it up—one poisoned skill can quietly walk off with cloud credentials, API keys, and sensitive company data.

New research from Permiso’s P0 Labs shows just how often that happens. After 35,286 runs in SandyClaw, their dynamic analysis sandbox, researchers found that 1 in 40 AI agent skills were actively malicious—a rate that would be completely unacceptable for enterprise browser extensions, yet is currently the norm for AI agents.

Worse, traditional security tools are blind to the problem. Across the full P0 Labs dataset, static security scanners missed 92% of malicious threats before they were executed.

Image

Why static scanners miss most threats

Most security scanners on the market rely on static analysis, inspecting a file’s code before it runs and trying to predict whether it’s dangerous.

P0 Labs took the approach the malware world settled on a decade ago: detonate the sample, meaning run it inside an instrumented sandbox with a live AI agent and watch what it actually does. Every run receives two verdicts—a static verdict before execution, and a runtime verdict based on observed behavior (tracking every LLM decision, outbound network call, file read/write, and credential access attempt).

Disposition category

Input verdict (static scanning)

Runtime verdict (during detonation)

Overall final verdict

Malicious

389

4,473

4,773

Suspicious

16,702

14,383

19,800

Benign

18,025

16,005

10,462

Note: Table excludes a small number of inconclusive, prevented, or missing runs. 

Pairing those two verdicts across 35,286 completed runs exposed a massive runtime gap:

  1. Static analysis missed 92% of all malicious threats (4,384 of 4,773). Detonation multiplied confirmed-malicious verdicts twelve-fold and stripped benign status from 42% of the files that static scanners had cleared as safe.

  2. Static scanners alone caught 0% of malicious code packages. All 389 static catches occurred exclusively on plain-text prompt submissions, where the attacker’s intent was written in plain English. By contrast, when P0 Labs analyzed 12,679 packages—the reusable chunks of code that developers pull into their applications from public registries like npm (JavaScript) and PyPI (Python)—4,037 (32%) were judged malicious at runtime, and static analysis didn’t catch a single one. (Note: Package rates reflect samples submitted to SandyClaw by researchers and customers who had a reason to look, rather than random marketplace-wide prevalence).

Why does static scanning fail so completely on code and skills? Because attackers know their files will be scanned. They hide their malice in behavior, using obfuscated payloads, staged downloads, and credential exfiltration disguised as ordinary API calls. Static analysis only sees the artifact, while runtime sees what it actually does.

What malicious AI skills are really after: credentials

AI agent skills represented the largest group in the P0 Labs research: 21,850 completed runs across 16,836 unique skills, the largest dynamically analyzed corpus of agent skills to date that we’re aware of.

 

Malicious rate by input type

Packages: 4,037 / 12,679. Prompt-only: 218 / 720 (small cohort; not a headline figure). Skills: 517 / 21,850. MCP servers (n=25) excluded as too small to report.

P0 Labs evaluates every run across four detection engines (Sigma, YARA, Nova, and Snort) alongside custom behavioral rules to sort submissions into three buckets:

  • Malicious (517 skill runs, or 2.4%, up from 341+ in April): Behavior with no legitimate explanation that matches known attack patterns, such as sending environment variables or credentials to an external command-and-control (C2) server, pulling down a secondary payload, or attempting to steal cloud tokens.

  • Suspicious (12,300 skill runs, or 56.3%): Behavior that is risky or doesn't match what the skill claims to do, though not conclusive on its own—such as unexpected network calls, obfuscated code, or reading local credential files.

  • Benign: Nothing flagged by any static or runtime engine.

The line between suspicious and malicious usually comes down to what happens next: reading a credential file is suspicious; sending it somewhere is malicious. Context also plays a major role—a backup skill touching hundreds of files is doing its job, whereas a markdown-formatting skill doing the exact same thing is a major red flag.

Most importantly for security leaders, the sandbox telemetry proves that malicious skills are built first and foremost to steal credentials. Beyond standard malware signatures, two of the highest-signal behavioral triggers in the dataset targeted identity infrastructure directly:

  • 6,256 Canary findings: Skills actively touching decoy credentials and secrets planted inside the sandbox.

  • 2,963 IMDS findings: Skills querying the cloud Instance Metadata Service (IMDS)—a classic attack technique used to harvest temporary cloud identity tokens from inside a running workload. (Note: Finding counts represent total engine triggers across runs, as a single malicious skill can trigger multiple findings).

Inside a real-world attack

What does a poisoned AI skill actually look like in the wild? In one campaign published by Cyera earlier this month and independently detonated by P0 Labs, attackers published three separate skills that looked completely routine on the marketplace:

  1. A utility that automatically keeps an agent and its installed skills updated every day

  2. A finance helper that pulls stock quotes from Yahoo Finance

  3. A document utility that edits PDFs

They were the kind of everyday productivity helpers an employee or developer might install without thinking twice. Even more convincingly, the stock quote and PDF editing features actually worked. They were simply the bait.

The trap was hidden in a note at the top of each skill instructing the user (or agent) that the skill wouldn't function until a small helper tool was installed first:

  • On macOS: The instructions prompted a paste of harmless-looking setup text into Terminal. Behind the scenes, the command was scrambled. Once decoded at runtime, it silently downloaded AMOS Stealer—a notorious infostealer malware designed to harvest saved passwords, browser session data, and crypto wallets.

  • On Windows: The setup instructions directed the system to pull down a password-protected ZIP payload hosted on a GitHub account.

Static code scanners looking for obvious malware inside the skill's primary functionality would easily miss the trap. When detonated inside SandyClaw's analysis sandbox, however, the platform decoded the hidden command and caught the skill trying to reach the attacker’s server, which the sandbox blocked.

Three priorities for defenders

Because AI skills can be installed in seconds and executed with the full power of an agent’s identity, enterprise security teams cannot rely on legacy code scanning to protect their environments. To stay safe, security leaders should:

1. Detonate before you trust

If an open-source package or AI skill is going to run with real credentials in your environment, its first execution should never be inside your production network. Dynamic sandbox detonation isn't just a complement to static scanning—for code and skill threats, it is the only reliable way to catch them before deployment. Before installing a new skill, practitioners and security teams can look it up by name, URL, or hash in SandyClaw’s free, searchable public repository, or submit unvetted skills for sandbox detonation.

2. Treat behavior as the source of truth after installation

Checking a skill before installation is essential, but runtime visibility cannot end at the initial verdict. A skill that is completely clean on Tuesday can pull a poisoned update on Thursday. Because skills have no identity of their own, the only tell will be behavioral, such as an existing identity suddenly touching cloud, SaaS, or data systems it has never touched before. Security teams need continuous runtime monitoring across all human, non-human, and AI agent identities to spot behavioral drift the moment it starts.

3. Connect the verdict—and your guardrails—to the identity layer

When a malicious skill executes, it runs as somebody, or as an agent owned by somebody. Looking at the nearly 19,800 suspicious runs in the P0 Labs dataset, security teams can only clear that gray area with identity context—knowing exactly what an AI agent should be allowed to reach in the first place.

If an agent is over-privileged, a single poisoned skill inherits a massive blast radius. To contain that risk, IT and security leaders must govern AI agents as first-class identities, enforcing strict least-privilege access, scoping down tokens, requiring human-in-the-loop step-up authentication for sensitive actions, and maintaining the ability to revoke an agent's session and credentials at the identity layer immediately.

Learn how to architect identity-first guardrails for your AI agents with the blueprint for securing the agentic enterprise.

This content is for informational purposes only, does not constitute professional advice, and is provided without warranties or liability; please consult your own advisors for implementation decisions. 

 

About the Author

Ian Ahl

Senior Director of Information Security Engineering

Ian Ahl is Senior Director of Information Security Engineering at Okta. He leads P0 Labs, the research team that built SandyClaw and tracks how attackers target human, non-human, and AI identities. Ian joined Okta from Permiso Security, where he was Chief Technology Officer, and previously led Advanced Practices at Mandiant.

Get our Identity newsletter

Access Granted Newsletter