Products Lemma APIProof issuance & verification platformTrust402Delegate to agents, and transactSealSign-in for the agent era — no keys handed over
Use cases Manufacturing & Critical InfraInspection Record AssuranceFinance & FinTechCounterparty Record VerificationPublic SectorCertificate-less ProceduresHealthcareQualified Worker AssuranceProcurement & Supply ChainSupplier Credential MonitoringMedia & ContentContent AuthenticityService & RetailCross-group IdentityAI Adoption (cross-industry)AI Run GovernanceDevelopers & Agent OpsAgent Authority Control ▸ Browse the use-case index
Pricing
Resources Critical BriefThe frontier of AI × trustBlogThinking and implementation notesDocumentationAPI & specsVerification CenterReal verification & issuance countsAbout usFRAME00, Inc.ContactSales & press inquiriesGlossaryDefinitionsFAQFrequently asked questions
Dashboard ↗ JA
Home / Critical Brief / No. 039
No. 039 Critical Brief · Agent Authority Proof

Semantic Kernel: prompt injection could lead to code execution on the host (Microsoft disclosure)

10.0
CVSS of CVE-2026-25592 (.NET SDK). Through an inadvertently exposed function, it could lead to arbitrary file writes and sandbox escape
2
Vulnerabilities Microsoft disclosed on 2026-05-07, one each in the .NET SDK and the Python SDK
27,000+
GitHub stars for Semantic Kernel, an AI agent framework widely used in enterprises
CountryGlobal
Incident date2026-05-07
Published2026-06-09
AuthorsLemma Critical Team
Contents
  1. 01Summary
  2. 02What got through
  3. 03Pre-execution check
  4. 04What Lemma does
  5. 05Facts and timeline
  6. 06Sources

Summary

According to Microsoft, in the .NET SDK a file-download function was inadvertently exposed so the LLM could call it, and the model largely decided the destination path. In the Python SDK, in a configuration using the search plugin under default settings, a single crafted prompt could reach code execution on the host. Both share one point: model output, which instructions slipped into the input can sway, could directly drive functions that touch the host. Fixed versions were provided on the day of disclosure. Unless the functions an agent calls and their arguments are checked before execution against a permitted scope managed apart from the model’s output, instructions slipped into the input become operations on the host.

Exhibit 1Detection vs pre-execution check

A pre-execution check means checking, before an agent executes a function, that the function and its arguments are within the permitted scope, and keeping a record. Detection means finding, disclosing and fixing vulnerabilities. The dates are when the issues were disclosed and fixed, not when the routes were used.

Pre-execution check · not known from the disclosuresBefore executing a function, check that the function and its arguments are within the permitted scope
What was confirmedInjected instructions could get
host-touching functions called
Detection · Microsoft disclosed and fixed itVulnerability disclosure, fixed versions
05-07
.NET SDK CVE-2026-25592 disclosed
05-07
Python SDK CVE-2026-26030 disclosed
05-07
Fixed in .NET 1.71.0
05-07
Fixed in Python 1.39.4

What got through

What got through
Calls to host-touching functions driven by LLM output. According to Microsoft, in the .NET SDK (CVE-2026-25592) DownloadFileAsync was inadvertently exposed as a [KernelFunction] the LLM could call directly. The destination path (localFilePath) was almost entirely under model control, with virtually no path validation. In the Python SDK (CVE-2026-26030), when the In-Memory Vector Store was used as the backend of the Search Plugin with default filter behavior, and an attacker had a prompt-injection path into the agent’s input, a single crafted prompt could reach code execution on the host.
What reached the receiving side
In general, an agent framework executes the function the model chose, with the arguments the model decided, as is. According to Microsoft, the .NET SDK issue could reach arbitrary file writes and sandbox escape, and the Python SDK issue could reach code execution on the host.
Not disclosed
Cases of exploitation in the wild and any resulting harm. The number of affected users.

Pre-execution check

Whatever the route, the condition for telling them apart is that, before an agent executes a function, it checks that the function may be called in this context and that its arguments are within the permitted scope, apart from the model’s output.

The core of this case
Unless the functions an agent calls and their arguments are checked before execution against a permitted scope managed apart from the model's output, instructions slipped into the input become operations on the host.
Who approves
The developers and operators who build the agent in. They decide, apart from the model’s output, the list of functions the LLM may call and the scope of each one’s arguments (such as which paths may be written). Operations outside that scope are approved by a person.
Where it is checked
Just before the framework moves the function the model chose into execution. It checks that the function is on the permitted list and the arguments are within the decided scope, and does not execute calls that cannot be checked.
What is recorded
Which function was called, with which arguments, under which permission (or was stopped). Kept apart from the agent, in a form that can be shown later.

Vulnerability disclosure and the fixed versions worked, and the two known routes were closed. What did not work was the layer before that, which checks the function and arguments the LLM chose against the permitted scope before execution. In that the design of agent infrastructure turns external input into privileged execution, this matches Brief 025, where MCP’s standard design became a path for RCE, Brief 027 on LibreChat and Brief 003 on Starlette / BadHost; in that the agent’s action is not tied to a check before the action, it connects with Brief 037, where a repository-bundled config was auto-executed and Brief 047 on OpenClaw.

What Lemma does

Lemma builds the pre-execution check into the point just before the agent framework moves a function into execution. It does not look for prompt injection; it checks the function and arguments the model chose, before execution, against a permitted scope managed apart from the model’s output.

Industries and operations to watch

IndustryAI
Organizations that, on an agent framework such as Semantic Kernel, let the LLM call functions touching file operations or code execution.
IndustryDevelopers
Development teams building systems in which the agent reads input an attacker could write to, such as documents, search results or external data. The framework’s default settings and the attribute that makes a function callable become, as is, the scope the LLM can call.

Current controls vs Lemma

This incident’s .NET SDK route falls in columns 1 and 2, and the Python SDK route in column 3.

Control Calling a function never meant to be exposed Out-of-scope arguments to a callable function (such as the destination path) Execution through a callable function’s default processing (search filter)
Updating to the fixed versions Partial Partial Partial
Minimizing the functions exposed to the LLM Effective Not relevant Not relevant
Strictly validating arguments (such as paths) Not relevant Effective Partial
Lemma (pre-execution check) Effective Effective Partial

Updating to the fixed versions closes the known routes, but if the next exposure happens through another function or another configuration, the same shape remains. Minimizing exposed functions and validating arguments are controls discussed as requirements for agent infrastructure, narrowing columns 1 and 2 respectively. Lemma checks the function the model chose against the permitted list, and its arguments against the decided scope, before execution, so a call to a function not on the list, or a write to a path outside the scope, stops before it runs. On the other hand, if a permitted function is called with in-scope arguments and the function’s internal processing has a flaw, the check matches. How well it works depends on how finely the argument scope can be decided, so column 3 is marked partial.

Note: Lemma’s check works only when it is built into the framework’s function execution, and the list of callable functions and the argument scopes are managed apart from the model’s output and the input the agent reads. If the permitted scope is set broadly, malicious calls within it go through. The check neither fixes flaws inside a function nor finds instructions in the input. The table compares what each control checks; it does not show whether this incident would have been stopped. Lemma does not detect or prevent intrusions.

CheckChecklist

Three things to confirm in organizations that let AI agents call functions

  • Is the semantic-kernel you use on a fixed version (Python 1.39.4 or later, .NET 1.71.0 or later)?
  • Do you know the list of functions the LLM can call, and keep functions that touch file operations or code execution to only those needed?
  • Can you see, apart from the agent, a record of which functions the agent called and with which arguments?

Facts and timeline

Subject
Microsoft Semantic Kernel (an AI agent framework; over 27,000 GitHub stars, widely used in enterprises). The .NET SDK and the Python SDK.
CVE-2026-25592 (.NET SDK, CVSS 10.0, sandbox escape)
DownloadFileAsync was inadvertently exposed with a [KernelFunction] attribute, in a state where the LLM could call it directly. The destination path (localFilePath) was almost entirely under model control, with virtually no path validation, so it could lead to arbitrary file writes and sandbox escape (Microsoft).
CVE-2026-26030 (Python SDK, code execution on the host)
when an agent used the In-Memory Vector Store as the backend of the Search Plugin with default filter behavior, and an attacker had a prompt-injection path into the agent’s input, a single crafted prompt could reach code execution on the host (Microsoft).
Fix
semantic-kernel 1.39.4 (Python) and 1.71.0 (.NET).
Framing (Microsoft’s blog)
presented as a case treating prompt injection not as an output-integrity problem but as an execution problem.

Glossary
Semantic Kernel — Microsoft's AI agent framework. The LLM moves work forward by calling functions (plugins) the developer provides. It has .NET and Python SDKs.
KernelFunction attribute — An attribute in the .NET SDK that makes a function callable by the LLM. A function carrying it can be called through model output.
Prompt injection — A technique that slips commands into documents, search results or external data the AI reads, so the AI treats them as instructions.

Timeline

  • Microsoft disclosed two Semantic Kernel vulnerabilities (CVE-2026-25592 / CVE-2026-26030), announcing that prompt injection could lead to code execution and arbitrary file writes on the host.
  • Fixed versions (Python 1.39.4 / .NET 1.71.0) were provided.

The facts in this Brief rest on the Microsoft Security Blog and the NVD CVE entries. CVSS values, conditions and fixed versions are as of disclosure. This Brief does not include reproduction steps. What has not been disclosed does not mean there were no controls.

After disclosure

  • Microsoft: disclosed the two vulnerabilities and provided fixed versions (Python 1.39.4 / .NET 1.71.0).
  • Design requirements: minimizing the exposure of functions, strict validation of arguments and authorization before execution are discussed as requirements for agent infrastructure.

Sources

References: “The last layer left for cyber defense in the age of AI”

The same method elsewhereSee all 40 "AI failure or misuse" cases

This Brief sets out, from disclosed facts, what organisations in a similar position can check. It is not guidance on individual losses or procedures.

This material is a structured analysis of public information; it is not an audit, diagnosis, or recommendation for any specific organization.

Cite this Brief

Lemma Critical Team. (2026).
"Semantic Kernel: prompt injection could lead to code execution on the host (Microsoft disclosure)".
Lemma Critical Brief No.039. Lemma / FRAME00, Inc.
https://lemma.frame00.com/critical/briefs/039-semantic-kernel-prompt-injection-rce/
Read nextNext
All Briefs →
Lemma

If it can't be verified,
it doesn't enter your operation.

Lemma is a pre-execution check: logins, payments, records and publishing that look genuine are checked before they run, with cryptographic proofs the receiving side verifies without asking the issuer. Detection stays; the check sits in front of it.