Skip to content

CVE-2026-26030: Verified Repro With Script Download

CVE-2026-26030: Semantic Kernel: RCE via InMemoryVectorStore Filter

CVE-2026-26030 is verified against semantic-kernel · pip. Affected versions: < 1.39.4. Fixed in 1.39.4. Vulnerability class: RCE. This critical reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00099.

REPRO-2026-00099 semantic-kernel · pip RCE Feb 19, 2026 CVE entry ↗ .txt
Severity
CRITICAL
CVSS
9.9
Reproduced in
25m 13s
Tool calls
114
Spend
$0.55
01 · Overview

What Is CVE-2026-26030?

CVE-2026-26030 is a critical remote code execution vulnerability (CWE-94) in Microsoft Semantic Kernel's Python SDK, specifically in the InMemoryVectorStore filter functionality. Pruva reproduced it (reproduction REPRO-2026-00099).

02 · Severity & CVSS

CVE-2026-26030 Severity & CVSS Score

CVE-2026-26030 is rated critical severity, with a CVSS base score of 9.9 out of 10.

CRITICAL threat level
9.9 / 10 CVSS base
Weakness CWE-94 (Code Injection) — Improper Control of Generation of Code ('Code Injection')

Critical — the most severe class — typically remotely exploitable with severe impact. Treat as an emergency.

03 · Affected Versions

Affected semantic-kernel Versions

semantic-kernel · pip versions < 1.39.4 are affected.

How to Reproduce CVE-2026-26030

$ pruva-verify REPRO-2026-00099
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00099/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
06 · Proof of Reproduction

Proof of Reproduction for CVE-2026-26030

Reproduced by Pruva's autonomous agents — 114 tool calls over 25 min. Full root-cause analysis and the complete transcript are below.

How the agent worked 386 events · 114 tool calls · 25 min
25 minDuration
114Tool calls
89Reasoning steps
386Events
1Dead-ends
Agent activity over 25 min
Support
31
Repro
206
Variant
145
0:0025:13

Root Cause and Exploit Chain for CVE-2026-26030

GHSA-xjw9-4gw8-4rqx: Microsoft Semantic Kernel InMemoryVectorStore RCE

Summary

The Microsoft Semantic Kernel Python SDK contains a critical Remote Code Execution (RCE) vulnerability in its InMemoryVectorStore filter functionality. The vulnerability allows attackers to escape the filter sandbox by accessing Python's dunder (double underscore) attributes such as __class__, __bases__, __subclasses__, __mro__, __dict__, and __getattribute__ within filter expressions. These attributes can be chained together to traverse Python's object hierarchy and gain access to sensitive classes and functions, potentially leading to arbitrary code execution.

Impact

Package: semantic-kernel (Python SDK) Affected Versions: < 1.39.4 Fixed Version: 1.39.4 Risk Level: CRITICAL (CVSS 10.0)

Consequences:

  • An attacker can escape the filter sandbox and execute arbitrary Python code
  • The vulnerability can be triggered through user-controlled filter expressions
  • Complete system compromise is possible through Python's introspection capabilities
  • The InMemoryVectorStore is not recommended for production use, but this vulnerability affects any application using it for testing or development

Root Cause

The vulnerability exists in the _parse_and_validate_filter method in python/semantic_kernel/connectors/in_memory.py. The method uses an allowlist approach to validate AST (Abstract Syntax Tree) nodes and function calls in filter expressions, but it fails to validate ast.Attribute nodes for dangerous attribute names.

Technical Details:
  1. The filter parser walks the AST and validates:

    • Node types against allowed_filter_ast_nodes (which includes ast.Attribute)
    • Name nodes against lambda parameter names
    • Function calls against allowed_filter_functions
  2. Missing validation: The code does NOT check if ast.Attribute nodes access dangerous dunder attributes like:

    • __class__ - Access to object's class
    • __bases__ - Access to base classes
    • __subclasses__ - Access to all subclasses of a class
    • __mro__ - Method Resolution Order (object hierarchy)
    • __dict__ - Access to object's attributes
    • __getattribute__ - Access to attribute retrieval method
  3. Exploitation chain: An attacker can chain these attributes to traverse from a simple data object to the root object class, enumerate all loaded classes via __subclasses__(), and find classes that expose dangerous functionality (like warnings.catch_warnings which can execute arbitrary code).

Fix:

The fix (PR #13505) adds a blocked_filter_attributes set containing dangerous attribute names and validates all ast.Attribute nodes against this blocklist:

# For Attribute nodes, validate that dangerous dunder attributes are not accessed
if isinstance(node, ast.Attribute) and node.attr in self.blocked_filter_attributes:
    raise VectorStoreOperationException(
        f"Access to attribute '{node.attr}' is not allowed in filter expressions. "
        "This attribute could be used to escape the filter sandbox."
    )

Reproduction Steps

The reproduction script is located at repro/reproduction_steps.sh.

What the script does:
  1. Creates a Python virtual environment
  2. Installs the vulnerable semantic-kernel version 1.39.3
  3. Creates an InMemoryVectorStore with a test collection
  4. Tests various filter expressions that access dangerous dunder attributes:
    • lambda x: x.__class__.__name__ == 'TestDataModel'
    • lambda x: x.__class__.__base__ is not None
    • lambda x: x.__class__.__mro__ is not None
    • lambda x: x.__dict__ is not None
    • lambda x: x.__getattribute__ is not None
    • lambda x: x.__class__.__bases__ is not None
Expected evidence of reproduction:

All tests pass in the vulnerable version, demonstrating that dangerous dunder attributes can be accessed without restriction. The output shows:

[+] Test 1 PASSED: Filter with __class__ executed: True
[+] Test 2 PASSED: Filter with __base__ executed: True
[+] Test 3 PASSED: Filter with __mro__ executed: True
[+] Test 4 PASSED: Filter with __dict__ executed: True
[+] Test 5 PASSED: Filter with __getattribute__ executed: True
[+] Test 6 PASSED: Filter with __bases__ executed: True
[+] Test 7 PASSED: Filter with method access executed: True

Evidence

Log location: $ROOT/logs/ (created by reproduction script)

Key excerpts from reproduction:

The script confirmed that in semantic-kernel 1.39.3, the following dangerous filter expressions execute successfully:

  1. lambda x: x.__class__.__name__ == 'TestDataModel' - Access to __class__ attribute
  2. lambda x: x.__class__.__base__ is not None - Access to __base__ attribute
  3. lambda x: x.__class__.__mro__ is not None - Access to __mro__ attribute
  4. lambda x: x.__dict__ is not None - Access to __dict__ attribute
  5. lambda x: x.__getattribute__ is not None - Access to __getattribute__ attribute
  6. lambda x: x.__class__.__bases__ is not None - Access to __bases__ attribute

Environment details:

  • Python 3.11
  • semantic-kernel 1.39.3 (vulnerable)
  • pydantic (dependency)
  • numpy (dependency)
  • scipy (dependency)

Recommendations / Next Steps

Immediate Actions:
  1. Upgrade to semantic-kernel 1.39.4 or later - This version contains the fix that blocks dangerous dunder attributes in filter expressions.

  2. Avoid using InMemoryVectorStore in production - Microsoft already recommends against using InMemoryVectorStore for production scenarios. Use a proper vector database instead (Azure AI Search, Redis, PostgreSQL with pgvector, etc.)

  3. Review existing code - Check if any existing code uses string-based filters with the InMemoryVectorStore. If so, ensure the semantic-kernel version is upgraded.

Testing Recommendations:
  1. Verify the fix - After upgrading, test that filter expressions with blocked attributes raise VectorStoreOperationException:

    # This should raise an exception after the fix
    filter_str = "lambda x: x.__class__.__name__ == 'TestDataModel'"
    
  2. Regression tests - Ensure legitimate filter expressions still work:

    # These should continue to work
    filter_str = "lambda x: x.content == 'test'"
    filter_str = "lambda x: x.id.startswith('prefix')"
    
Long-term Recommendations:
  1. Input validation - Never pass user-controlled or LLM-generated filter strings directly to the InMemoryVectorStore without strict validation.

  2. Security review - Conduct security reviews of any code using dynamic filter expressions.

Additional Notes

Idempotency Confirmation:

The reproduction script is idempotent and passes two consecutive runs:

  • First run: Installs dependencies and confirms vulnerability
  • Second run: Reuses virtual environment, still confirms vulnerability
Edge Cases:
  1. Fixed version behavior - In semantic-kernel 1.39.4+, attempting to use blocked attributes in filter expressions will raise:

    VectorStoreOperationException: Access to attribute '__class__' is not allowed in filter expressions. This attribute could be used to escape the filter sandbox.
    
  2. Partial RCE chains - While the reproduction demonstrates access to dangerous attributes, a full RCE chain would require additional steps to find and invoke a class that executes arbitrary code. The vulnerable version allows these chains; the fixed version blocks them at the attribute access level.

References:

CVE-2026-26030 Reproduction Transcript

The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.

Full session Replay every step — scrub the timeline or play it back.

Event 1/40
0:003:20
0:00
session startedaccounts/fireworks/models/kimi-k2p5 · ghsa-xjw9-4gw8-4rqx · ghsa-xjw
0:06
0:30
0:44
0:54
0:57
web search
1:00
1:03
web search
1:13
1:15
1:22
web search
1:24
1:26
1:35
web search
2:17
2:17
extract_facts
no facts extracted
2:35
2:35
2:35
supportrepro
3:14
3:14
3:14
3:20

Artifacts and Evidence for CVE-2026-26030

Scripts, logs, diffs, and output captured during the reproduction.

No artifacts available

08 · How to Fix

How to Fix CVE-2026-26030

Upgrade semantic-kernel · pip to 1.39.4 or later.

Coming soon

Step-by-step mitigation and hardening guidance for CVE-2026-26030 — configuration checks, workarounds where no patch exists, and how to verify you're protected — is on the way.

10 · FAQ

FAQ: CVE-2026-26030

How does the Semantic Kernel filter-sandbox-escape attack work?

An attacker supplies a filter expression that chains Python dunder attributes such as __class__, __bases__, __subclasses__, __mro__, __dict__, and __getattribute__; because these attribute accesses aren't rejected by the allowlist check, the attacker can traverse Python's object hierarchy from within the filter sandbox to reach sensitive classes and functions and ultimately execute arbitrary code.

Which Semantic Kernel versions are affected by CVE-2026-26030, and where is it fixed?

Semantic Kernel Python SDK versions before 1.39.4 are affected; it is fixed in 1.39.4.

How severe is CVE-2026-26030?

It is rated critical (CVSS 10.0) - an attacker-controlled filter expression can escape the InMemoryVectorStore sandbox and achieve complete system compromise through Python's introspection capabilities.

How can I reproduce CVE-2026-26030?

Download the verified script from this page and run it in an isolated environment against Semantic Kernel Python SDK <1.39.4; it submits a crafted InMemoryVectorStore filter expression chaining dunder attributes to reach arbitrary code execution, then confirms 1.39.4 blocks the attribute chain.
11 · References

References for CVE-2026-26030

Authoritative sources for CVE-2026-26030 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.