
Proof-of-concept exploit for CVE-2026-26030, demonstrating remote code execution via unsafe filter expressions in Microsoft Semantic Kernel's InMemoryVectorStore.
CVE-2026-26030
Untrusted filter expressions in InMemoryVectorStore allow unsafe attribute resolution leading to arbitrary Python code execution via __builtins__ / globals traversal.
Mohammed Idrees Banyamer
Security Researcher
flowchart TD
A[User-controlled filter string] --> B[Passed to VectorStore query/filter]
B --> C[InMemoryVectorStore evaluates filter expression unsafely]
C --> D[Unsafe attribute resolution via __class__ / __base__ / __subclasses__]
D --> E[Access to __init__.__globals__ containing os and __builtins__]
E --> F[Arbitrary code execution e.g. os.system]
F --> G[Remote Code Execution in application context]
style G fill:#ff6666,stroke:#333,stroke-width:2px
Description
Untrusted / user-controlled filter expressions passed to InMemoryVectorStore are evaluated unsafely, allowing attribute traversal that reaches __builtins__, globals, and eventually the os module — resulting in arbitrary Python code execution.
Important notes
The exploit demonstration is provided in a separate file:
exploit.py
# 1. Install vulnerable version (for testing / research purposes only!)
pip install semantic-kernel==1.39.0
# 2. Run the PoC
python3 exploit.py
Upgrade immediately to semantic-kernel >= 1.39.4
Applications using InMemoryVectorStore should:
MIT License
Copyright © 2026 Mohammed Idrees Banyamer