
By Elnatan Revital, Bar Kaduri, Lidan Hazout from Capsule Security, in collaboration with Amit Bleiweiss, Gal Mizan, Shiri Hochhauser from NVIDIA
AI agents are rapidly moving beyond simple chat interactions and into environments where they can modify code, access databases, interact with infrastructure, and execute actions autonomously. This new level of capability creates a new category of security risk: agents that take actions outside their intended scope.
These failures don't require a malicious actor. An agent can misinterpret instructions, bypass approval workflows, overstep operational boundaries, or independently decide that a risky action is the "best" way to accomplish its goal. When this happens, the result can be just as damaging as a traditional security incident. Recent events have shown that this risk is no longer theoretical:

These incidents illustrate a common pattern: agents deviating from their intended role and taking actions that humans never explicitly authorized. Preventing these failures requires evaluating agent behavior as it happens - before a tool call is executed, not after the damage is done. However, real-time protection introduces a new challenge: latency. Sending every action to a large frontier model for security review is often too slow and too expensive to sit inline with agent execution.
A detector is only as good as the boundary it learns. To build a high-precision, low-latency detection mechanism, our pipeline is built to teach the model precisely where acceptable behavior ends and a violation begins. We established a rigorous methodology:

Our journey to the ultimate rogue-agent detector happened in two distinct phases, allowing us to deeply explore the tradeoff between size, speed, and architectural efficiency.
We began by selecting the NVIDIA Nemotron-3-Nano-4B-BF16 (an open hybrid Mamba-2 + Transformer + MLP architecture) as our initial base model. We prioritized this because Nemotron models are cost-effective and built for fast inference. In the critical path of inline agent interception, every millisecond counts.
The results were phenomenal. On an AWS ml.g5.2xlarge (A10G) instance, the fine-tuned 4B model achieved 93.8% accuracy, significantly outperforming larger models. In production security environments, alert fatigue is a dealbreaker. We fixed precision at a strict floor of ≥95% and measured recall. The 4B model achieved 97.3% recall, while the next-best competitor caught only 16.8%.

Following this success, We tried to push the results even higher and applied our pipeline to the flagship model NVIDIA Nemotron-3-Nano-30B-A3B - a hybrid Mamba-2 + Transformer Mixture-of-Experts (MoE) architecture. Although the model loads 31.6 billion parameters in memory, its MoE design activates only ~3.2 billion per token (the "A3B"). Leveraging this efficient architecture, we followed NVIDIA's LoRA fine-tuning approach for Nemotron-3-Nano to specialize the model. This combination delivered the reasoning quality of a 30B-class model while maintaining the per-token compute and latency profile of a ~3B model.
The benchmark results were astounding. The 30B-A3B model achieved a 96.9% accuracy and a 0.994 ROC-AUC, extending our lead to +10.9 points over the best third-party model tested.

The following graph shows the accuracy and performance metrics across the evaluated detection models:

For context, the graph compares our specialized LoRA fine-tuned models against various off-the-shelf close and open-weight models. These other models were evaluated in their base, non-fine-tuned state to demonstrate the significant performance gains achieved specifically through our domain-specific training and specialization.
Beating best in class accuracy is only half the job; to run inline at enterprise scale, the detector must be cheap to serve. Following NVIDIA's recommended recipe, we quantized the fine-tuned Nemotron-3-Nano-30B detector to FP8, nearly halving its memory footprint (from 63 GB to 32 GB) with no measurable loss in quality.
This efficiency completely changes where the detector can run. While full precision demands a flagship H100, the FP8 model fits comfortably on a cost-efficient, widely-available L40S (48 GB) GPU. Running on the L40S, it serves at a median 205ms per decision, well inside the 500 ms inline budget.
We also tested the smaller Nemotron-3-Nano-4B variant on the same L40S, achieving even faster times - 71 ms median (roughly 3× quicker) at 93.9% accuracy. On identical hardware, that gives a clean speed-vs-accuracy dial: Nemotron-3-Nano-30B for peak accuracy, and Nemotron-3-Nano-4B for maximum throughput - both well within the 500 ms inline budget.

The choice between these two architectures represents a strategic trade-off based on deployment constraints. The Nemotron-3-Nano-4B model is ideal for environments prioritizing an extremely low memory footprint and maximum cost-efficiency. In contrast, the Nemotron-3-Nano-30B-A3B model offers superior reasoning capabilities and higher performance, making it the preferred choice for complex security analysis where the higher memory overhead is acceptable.

To test our detector against an independent benchmark, we evaluated it on StepShield, a public benchmark for step-level rogue-agent detection (released under CC-BY-4.0): Its held-out evaluation set contains 216 agent trajectories - 108 rogue and 108 clean - built from incident templates that never appear in training, spanning six violation categories (data exfiltration, privilege escalation, resource hijacking, supply-chain, destructive actions, and covert persistence) across three severity levels.
StepShield's key contribution is treating detection timeliness as a first-class metric via EIR (Early Intervention Rate): among trajectories a detector catches, the fraction it flags at the divergence step or within k=3 steps after - penalizing "Forensics Trap" monitors that fire indiscriminately on benign prefix code.
We tested our models on the same in-domain protocol behind StepShield's published numbers, scored with their own EIR implementation. Against all four of their reported baselines:

*StepShield benchmark by Gloria Felicia et al. (2026), used under [CC BY 4.0]
Source: stepShield
Baseline figures (GPT-4.1-mini, StaticGuard, HybridGuard, ConstraintGuard) are as reported by the authors.*
Our 30B detector leads on all three axes: it catches 99% of rogue trajectories, false positives on under 1% of clean runs (~6× better than the strongest baseline), and - critically - flags the violation at the exact step it occurs (median intervention gap of 0 steps), giving the highest early-intervention rate on the board.
By leveraging the NVIDIA Nemotron architecture across both the highly efficient 4B and the powerful 30B MoE models, we've demonstrated that specialized Small Language Models (SLMs) are the key to safely scaling trusted agentic workflows across the enterprise. Moving beyond general-purpose models to specialized, efficient detectors allows organizations to secure their agentic workflows without sacrificing speed, cost, or performance.

Capsule Security research uncovered a behavior in Cursor's agent: asked to do something ordinary like share a file, it decides on its own to upload the file to a public anonymous host to get a link. It will push past a deny-all network sandbox to do it, and no attacker is involved. We found it running in production across every major model, reported it to Cursor, and were met with silence.

Modern AI agents are increasingly causing critical system damage not through external cyberattacks, but by taking unprompted, off-script actions across unguarded tools like databases and system shells. Traditional safeguards, including prompt instructions and human approval workflows, routinely fail to catch these autonomous errors before execution. To mitigate this growing risk, security must shift directly to the tool-call boundary, enforcing deterministic runtime controls that intercept and block destructive commands before they run.

Capsule launches a security integration for Claude Platform, using Claude's Compliance API to give security, compliance, and AI governance teams visibility into enterprise AI activity, risk, and posture across Anthropic-hosted deployments.

Our analysis of 206,435 AI agent skills reveals a rapidly growing software supply chain vulnerable to natural language payloads and dangerous capability combinations. Read the report to understand how these skills bypass traditional security controls and learn how Capsule protects your organization by securing the agent runtime.
.png)
The theoretical phase of agentic AI security is over—the attack surface is real and the incidents are documented. This post breaks down the defensive architecture taking shape in response: Meta's Agents Rule of Two, deterministic enforcement hooks, identity governance for non-human agents, and the questions security leaders need to be asking right now.

The security risks of AI agents are no longer theoretical. This blog examines the active threat landscape facing agentic AI in 2026, from prompt injection and supply chain attacks against MCP and skill registries to the governance gap created by vibe coding and Shadow AI.

Guardian agents are emerging as a critical security layer for the agentic AI era. As enterprises adopt AI agents that execute tools, handle sensitive data, and operate inside real workflows, human approval loops no longer scale. Guardian agents solve this by supervising other agents in real time: monitoring actions, enforcing policy, and blocking risky behavior before execution.
.png)
Capsule found two Cursor IDE vulnerabilities that let hidden prompt-injection instructions in referenced files steal developers’ SSH keys and contaminate future unrelated projects, causing zero-click or one-click exfiltration even when the attacker ships no malicious code.

Capsule Security’s State of AI Agent Security 2026 report is the largest independent audit of AI agents to date, showing that the ecosystem is rapidly shipping publicly exposed, weakly guarded, highly connected agents with recurring misconfigurations, near-absent runtime controls, widespread prompt-injection risk, expanding supply-chain exposure, and active malicious campaigns still propagating through agent skill and tool registries.

Capsule is launching a runtime security platform for the agentic AI era, built to monitor and stop autonomous agents that can bypass traditional guardrails, misuse legitimate access, and create a new class of enterprise security risk.

Capsule research team discover a critical prompt injection vulnerability in Salesforce Agentforce that allows attackers to exfiltrate CRM data through a simple lead from a form submission. No authentication required.