The Research Report
Microsoft Semantic Kernel RCE: Prompt Injection Meets eval(), CVSS 10.0
CVE-2026-26030 is the first time a major vendor has disclosed prompt injection as a first-party critical vulnerability. A CVSS 10.0 remote code execution bug in Microsoft's Semantic Kernel Python SDK proves that AI infrastructure carries real, exploitable security debt.
What Happened
On February 19, 2026, Microsoft published CVE-2026-26030 with a CVSS score of 10.0, the maximum possible rating. The vulnerability exists in Semantic Kernel's InMemoryVectorStore filter parser, which passes user-supplied filter expressions to Python's eval() function with an AST-based filter as the only security boundary.
The result: full remote code execution in the context of the application process. No authentication required. No special privileges needed. Any application passing user-controlled input to the filter interface was vulnerable.
Dan Aridor of SPR{K}3 Security Research discovered and responsibly disclosed the vulnerability on December 1, 2025. The patch shipped in Semantic Kernel python-1.39.4 (PR #13505).
The Technical Root Cause
The vulnerability is not a subtle logic bug. It is a fundamental category error.
Semantic Kernel's InMemoryVectorCollection.parseandvalidatefilter accepts user-supplied filter expressions for querying stored vectors in RAG pipelines. The implementation evaluates these expressions using Python's built-in eval() function, with an Abstract Syntax Tree (AST) filter applied to restrict what syntax is evaluated.
The design intent is clear: allow flexible filter syntax while blocking dangerous operations by examining and restricting the AST before evaluation.
The flaw is that AST filtering constrains syntax. It cannot constrain runtime object graph traversal.
The Escape Chain
Python's object model exposes the complete class hierarchy from any object instance. Every Python object carries class, every class carries bases and subclasses(). These are standard introspection attributes present on every object.
An attacker can write a filter expression that uses only attribute access, subscript access, and method calls. All three are syntactically benign. An AST filter examining this expression finds nothing objectionable: no import statements, no exec() calls, no os references.
At runtime, the expression traverses to the base object hierarchy and enumerates every subclass loaded in the Python runtime. Because Python loads its standard library during typical application runs, this enumeration includes classes from os, subprocess, and other modules that provide operating system access.
From there, the attacker inspects init.globals on loaded subclasses to locate and invoke any function available to the Python runtime.
Result: full remote code execution.
Why AST Filtering Cannot Prevent This
An AST filter operates on parsed structure before evaluation. It can block:
- Import statements (
import os) - Direct built-in calls (
exec(),eval(),import()) - Attribute access to explicitly blacklisted names
- String-based indirect access (
builtins['exec'])
What an AST filter cannot block is object graph traversal through attributes that are not individually blacklisted. class, bases, and subclasses() are not dangerous names. They are standard Python introspection attributes. Blacklisting them individually is feasible but brittle: Python's object model provides many equivalent traversal paths through mro, dict, type(), and other mechanisms.
The correct mental model: eval() with AST filtering is not a sandbox. It is eval() with a partial blocklist. These are not equivalent.
Why This CVE Matters Beyond Semantic Kernel
CVE-2026-26030 is not an isolated bug in one framework. It is the first time a major vendor has formally acknowledged prompt injection as a critical security vulnerability with a CVE, CVSS 10.0 rating, and official security advisory.
Until now, prompt injection has lived in a gray zone. Security researchers demonstrated it. Blog posts documented it. But vendors treated it as a model behavior issue, not a software vulnerability class.
Microsoft's own MSRC classified this under "Copilot / AI + ML / LLMs" and confirmed "Security Impact: Remote Code Execution." That classification matters. It establishes precedent that prompt injection pathways in AI infrastructure can produce RCE, and they deserve the same severity tracking and disclosure process as traditional software vulnerabilities.
The Broader Pattern
Aridor's research identifies the eval()-with-AST-filtering pattern as endemic to AI infrastructure. Categories most likely to contain this pattern:
- Vector databases with filter expressions (high risk)
- LLM orchestration frameworks with query or condition parsers (high risk)
- RAG pipelines with user-configurable retrieval filters (high risk)
- Agent frameworks evaluating tool selection conditions (medium risk)
- ML platforms with custom DSL or expression interfaces (medium risk)
The pattern is not limited to Python. Equivalent object graph traversal attacks exist in JavaScript (prototype chain), Ruby (ObjectSpace), and other dynamic languages.
The diagnostic question for any team: if your framework evaluates user-controlled expressions at runtime, and your security boundary is an AST filter or a blocklist, you likely have this vulnerability.
The Bounty Question
MSRC classified the vulnerability as Remote Code Execution with CVSS 10.0 and published the CVE. But the bounty decision was OUTOFSCOPE_REVIEWED. No bounty was awarded.
Aridor submitted a formal reassessment request. No response was received as of his publication date.
A CVSS 10.0 RCE in a Microsoft AI SDK, responsibly disclosed, confirmed by MSRC engineering, published with a CVE, and no bounty awarded. Readers can draw their own conclusions about what this signals about vendor incentive structures for AI vulnerability research.
Remediation: What Works and What Does Not
What Does Not Work
- Expanding the AST blocklist to include
class,bases,subclasses(). Python provides equivalent traversal paths throughmro,dict,type(), and other mechanisms. Blocklists are inherently incomplete.
- Restricting eval() to a custom globals dict. Unless the runtime is completely isolated, attribute traversal from any accessible object can escape the restricted globals.
- Catching exceptions from dangerous operations. Exception handling cannot prevent the traversal itself.
What Works
- Implement a proper DSL parser. Define a grammar for your filter language and parse it explicitly. Never pass user input to
eval(). This is the only fundamentally sound approach.
- Whitelist-based evaluation. Define a fixed set of allowed operations and implement them directly, without runtime evaluation. For simple filter conditions this is usually sufficient.
- Subprocess isolation. If runtime evaluation is genuinely required, evaluate expressions in a subprocess with no shared memory and strict OS-level sandboxing (seccomp, namespaces).
- Established sandboxing libraries. Libraries like RestrictedPython provide more robust sandboxing than hand-written AST filters, though they are not guaranteed to be complete.
The simplest remediation: do not use eval() on user-controlled input. If your feature requires expression evaluation, invest in a proper parser. The security debt of eval()-based sandboxes compounds over time.
Detection Guidance
For security engineers auditing codebases for this pattern:
- Any call to
eval(),exec(), orcompile()that processes user-supplied strings - AST visitor or transformer classes co-located with
eval()usage, which signals attempted AST-based sandboxing - Filter, query, or expression parser functionality in vector store or retrieval components
- Custom DSL implementations that fall back to
eval()for complex expressions
What This Means for the Field
CVE-2026-26030 establishes three things:
- Prompt injection is a CVE-class vulnerability. The era of treating it as a model quirk is over. When user-controlled input reaches
eval()through an AI pipeline, it produces RCE.
- AI infrastructure has eval() debt. The same insecure pattern appears across vector databases, LLM orchestration frameworks, and RAG pipelines. Semantic Kernel is the first to get a CVE for it. It will not be the last.
- AST filtering is not a sandbox. This is a category error, not a configuration mistake. No amount of blocklist expansion fixes it.
If you maintain an ML framework, vector database, LLM tool, or agent framework with a filter or query interface, audit your eval() usage now. The bypass chain is well-known. The attack surface across AI infrastructure is not.
References
- CVE-2026-26030 on NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-26030
- GitHub Security Advisory GHSA-xjw9-4gw8-4rqx: https://github.com/microsoft/semantic-kernel/security/advisories/GHSA-xjw9-4gw8-4rqx
- Dan Aridor's technical writeup: https://daridor.blog/2026/03/05/ast-filtered-eval-is-not-a-sandbox-remote-code-execution-in-microsoft-semantic-kernel-and-the-ai-infrastructure-pattern-behind-it/
- Semantic Kernel PR #13505 (patch): https://github.com/microsoft/semantic-kernel/pull/13505
- CWE-94: Improper Control of Generation of Code: https://cwe.mitre.org/data/definitions/94.html