← Back to blog

AI Agent RCE: How 6 Bypasses Break Microsoft Semantic Kernel Security

6 critical AI Agent RCE bypasses break Microsoft Semantic Kernel. CVSS 10.0 path traversal and CVSS 9.9 code execution vulnerabilities revealed.

AI Agent RCE: How 6 Bypasses Break Microsoft Semantic Kernel Security

When AI Agents Become Attack Vectors

An AI agent that can read your files, execute code, and interact with external systems sounds productive — until an attacker figures out how to make it do all of that on their behalf. That is exactly the scenario playing out with multiple critical vulnerabilities discovered in Microsoft's Semantic Kernel SDK and Agent Framework 1.0, including a path traversal flaw scored at CVSS 10.0 and a code execution bug at CVSS 9.9.

Put simply: if your application uses Semantic Kernel to give AI agents access to files or shell commands, those agents may already be one malicious prompt away from full system compromise.

What Broke: Two Critical CVEs in Detail

CVE-2026-25592 — Arbitrary File Write via Path Traversal (CVSS 10.0)

The first vulnerability sits in the SessionsPythonPlugin component of the Semantic Kernel .NET SDK. According to SentinelOne's analysis, the DownloadFileAsync and UploadFileAsync methods accept user-controlled file paths without verifying they remain within an allowed directory scope.

The attack is straightforward. An attacker crafts a path like ../../../../path/to/sensitive/file and feeds it through the agent's function-calling mechanism. As Miggo's vulnerability report explains, this works in both directions:

  • Uploads: the agent reads arbitrary files from the host filesystem and exfiltrates them to the attacker.
  • Downloads: the agent writes attacker-controlled content to any location on the filesystem, potentially overwriting critical system or application files.

The localFilePath parameter simply is not sanitized. No checks for ../ sequences, no validation against an allowlist, no containment within a sandbox directory. The vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) — a class of bug that has existed since the earliest days of web development, now resurfacing in AI tooling.

Real numbers: Averlon's intelligence report confirms the CVSS score at 10.0 — the maximum possible severity. All versions of the .NET SDK prior to 1.71.0 are affected.

CVE-2026-26030 — Remote Code Execution via InMemoryVectorStore Filters (CVSS 9.9)

The second vulnerability targets the Python SDK side. According to WindowsForum's coverage, specially crafted filter expressions passed to the InMemoryVectorStore filter functionality can execute arbitrary Python code on the host.

This is not a theoretical risk. If your application allows any form of user input to influence vector store queries — and most RAG (Retrieval-Augmented Generation) pipelines do — an attacker can inject code through the filter mechanism. All Python SDK versions prior to 1.39.4 are vulnerable.

The SANS Internet Storm Center lists this vulnerability with a CVSS base score of 9.9, and it was included in Microsoft's March 2026 Patch Tuesday alongside 83 other fixes.

The Agent Framework Shell Tool: Unsanitized Command Execution

Beyond the Semantic Kernel SDK vulnerabilities, CERT/CC published VU#431821 documenting a separate but related issue in the Microsoft Agent framework. The shell tool does not properly sanitize commands before execution, allowing attackers to achieve arbitrary command execution on target systems.

The attack chain works through prompt injection. When an agent processes or retrieves external content — analyzing code, summarizing documents, or performing tasks that involve interacting with attacker-controlled data — an attacker can influence the agent into executing unintended shell commands. CERT/CC explicitly states that "no patch or vendor statement was obtained during the coordination process."

Honest take: this is not a niche edge case. Every AI agent that processes external documents, web pages, or user-submitted content is a potential target. The agent does not need to be explicitly told to run a command. The injected instructions just need to be convincing enough for the language model to follow them — and modern prompt injection techniques are remarkably effective at this.

The 6 Bypasses: Why Input Validation Alone Fails

The research behind these disclosures, referenced in the SANS diary as "Full-chain RCE in Microsoft Semantic Kernel & Agent Framework 1.0 (6 Bypasses)," demonstrates that attackers found six distinct ways to circumvent validation layers. While the full technical details of each bypass are not publicly enumerated in the sources, the pattern they reveal is critical for any team building on these frameworks.

Why Multiple Bypasses Exist

Put simply: AI agent frameworks face a fundamentally different security challenge than traditional web applications. In a standard application, input flows through a predictable path — HTTP request to controller to database. Validation happens at known boundaries. In an agent framework, the flow looks more like this:

  1. User input reaches the language model
  2. The model decides which tools to call and with what arguments
  3. Those arguments pass through (or around) validation layers
  4. The tool executes with the application's permissions

Each step introduces opportunities for bypass. Shell parsing semantics differ from how validation layers tokenize input. Path normalization behaves differently across operating systems. Filter expressions that look safe as strings become executable when evaluated. The six bypasses likely exploit these seams — the gaps between what validation expects and what execution actually does.

The Compounding Problem

A single bypass is a bug. Six bypasses in the same framework suggest a structural issue: the validation architecture was designed for a simpler threat model than what AI agents actually face. When an agent can call functions, write files, and execute commands, every piece of untrusted input that reaches the agent becomes a potential exploit chain.

According to a DigitalCook analysis shared on LinkedIn, these vulnerabilities "highlight the growing security risks associated with AI frameworks as they become more integrated into enterprise environments," with prompt injection and training data poisoning emerging as primary attack vectors.

Real-World Impact: What Full-Chain RCE Means for Your Infrastructure

SentinelOne's analysis spells out the consequences: "A successful exploit could compromise the entire AI infrastructure and any systems the agents have access to." Specific scenarios include:

  • Overwriting critical system files — replacing executables or libraries to backdoor the host
  • Planting malicious executables in startup directories — persistence across reboots
  • Modifying configuration files — redirecting traffic, disabling security controls, or establishing persistent access
  • Data exfiltration — reading any file the application process can access, including secrets, credentials, and customer data

The OpenClaw vulnerability documented by security researcher Noam Schwartz illustrates how quickly these attacks escalate in practice. In that case, a single click on a link was enough to silently change an AI agent's gateway endpoint, leak authentication tokens over WebSocket, disable safeguards, and execute commands directly on the host machine — "a full compromise in milliseconds, just by clicking a link."

That is the threat model for AI agents in 2026. Not theoretical, not requiring sophisticated tooling — just a crafted link or a poisoned document.

How to Protect Your Deployment

Immediate Patches

Vulnerability Affected Component Fix Version
CVE-2026-25592 Semantic Kernel .NET SDK (SessionsPythonPlugin) 1.71.0+
CVE-2026-26030 Semantic Kernel Python SDK (InMemoryVectorStore) 1.39.4+
VU#431821 MS-Agent Shell Tool No patch available

Here is what we recommend for teams running Semantic Kernel in production:

1. Patch Immediately

Update the .NET SDK to version 1.71.0 or later and the Python SDK to 1.39.4 or later. These are not optional updates. A CVSS 10.0 vulnerability means every exposed instance is a priority target.

2. Implement Function Invocation Filters

Averlon's report recommends creating a Function Invocation Filter that checks arguments passed to DownloadFileAsync or UploadFileAsync to ensure the localFilePath is explicitly allow-listed. This provides defense-in-depth even after patching — if a future bypass is discovered, the filter acts as a secondary barrier.

3. Sandbox Agent Execution

AI agents should never run with the same permissions as your application server. Container isolation, restricted filesystem access, and least-privilege service accounts are baseline requirements. If an agent needs to write files, it should only have access to a specific, isolated directory — not the entire filesystem.

4. Treat All Agent Input as Untrusted

This includes documents the agent summarizes, web pages it visits, code it analyzes, and user messages it processes. Prompt injection is not a user error — it is an attack vector. Content that flows into agent context must be sanitized, and agent actions must be constrained regardless of what the prompt says.

5. Audit Shell Tool Usage

For the unpatched VU#431821, the only mitigation is to restrict or remove shell tool access entirely. If your agents require command execution, implement a strict allowlist of permitted commands and validate every argument against known-safe patterns. Better yet, replace shell execution with purpose-built function tools that perform specific tasks without exposing a general command interface.

6. Monitor Agent Behavior

Log every tool call, every file access, and every command execution. Set up alerts for path traversal patterns (../), unusual file paths, and unexpected shell commands. Runtime monitoring is your last line of defense when static validation fails — and as six bypasses demonstrate, static validation can fail.

The Bigger Picture: AI Framework Security Is Immature

These vulnerabilities are not isolated incidents. They represent a pattern that will define the next several years of software security.

Traditional application security has had decades to develop frameworks, tools, and best practices. SQL injection was first documented in 1998, and parameterized queries are now standard. Cross-site scripting has well-understood mitigations. Path traversal is a solved problem in most web frameworks.

AI agent frameworks are reopening all of these attack surfaces in a new context. The SessionsPythonPlugin path traversal vulnerability is functionally identical to bugs that were common in PHP applications fifteen years ago. The difference is that now the input comes through a language model, which makes it harder to trace and easier to exploit through indirect injection.

Key takeaway for business: AI agents multiply both productivity and attack surface. Every tool an agent can use is a tool an attacker can potentially misuse. The security investment required to safely deploy AI agents is significantly higher than deploying a traditional API — and most teams are underestimating that cost.

Organizations adopting Semantic Kernel, AutoGen, or any AI agent framework should budget for:

  • Security review of every plugin and tool the agent can access
  • Red team exercises specifically targeting prompt injection and indirect injection
  • Runtime monitoring infrastructure capable of detecting anomalous agent behavior
  • Incident response plans that account for agent-mediated compromise

The alternative — deploying AI agents with the same security posture as a standard web application — is how organizations end up with a CVSS 10.0 vulnerability in production.

Frequently Asked Questions

How can attackers inject crafted content into agent data sources to trigger command execution?

Attackers embed malicious instructions in documents, web pages, code repositories, or any content the agent processes. When the agent reads this content, the language model may interpret the injected text as instructions and execute them through available tools — including shell commands. This is known as indirect prompt injection and does not require direct access to the agent's prompt.

What are the six validation layer bypasses in the Agent Framework Shell tool?

The specific technical details of all six bypasses have not been fully disclosed in public sources. However, the pattern involves exploiting differences between how validation layers parse and tokenize input versus how the shell actually interprets commands. Shell parsing semantics, path normalization quirks, and encoding tricks create gaps that allow payloads to pass validation but still execute as intended by the attacker.

How should teams migrate existing Semantic Kernel plugins to Agent Framework 1.0 while maintaining security?

Start by auditing every plugin for unsanitized input handling — the SessionsPythonPlugin vulnerability shows that even official Microsoft plugins can contain critical flaws. Implement Function Invocation Filters as a defense-in-depth layer. Run agents in sandboxed environments with minimal permissions. Test your deployment against prompt injection attacks before going live. Most importantly, update to patched versions: .NET SDK 1.71.0+ and Python SDK 1.39.4+.

Why does the Shell tool interpret attacker-influenced text as executable logic?

AI agents operate by translating natural language into tool calls. The shell tool accepts commands as strings and executes them. When attacker-controlled content reaches the language model's context — even embedded within legitimate data — the model may follow the injected instructions because it cannot reliably distinguish between legitimate user instructions and malicious content embedded in data. This is a fundamental architectural challenge, not just an input validation bug.

This article is based on publicly available sources and may contain inaccuracies.

Related articles

✦SqueezeAI
  1. Microsoft Semantic Kernel contains two critical CVEs: a path traversal bug (CVSS 10.0) allowing arbitrary file read/write via unsanitized `../` sequences, and an RCE flaw (CVSS 9.9) where crafted filter expressions execute arbitrary Python code — both exploitable through normal AI agent function-calling.
  2. Input validation alone is insufficient because at least 6 bypass techniques exist, meaning blocklist-based sanitization of user-controlled paths and expressions cannot be trusted as a defense.

Powered by B1KEY