CVE-2026-59865 Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`

Critical 9.3 Published Updated

Attackers can inject commands via malicious OpenAPI descriptions, leading to code execution when users run suggested install commands.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59865?

CVE-2026-59865 is a critical command injection vulnerability in microsoft kiota, published on 16 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.<language>.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.

Weakness: CWE-94, CWE-829

Which versions are affected by CVE-2026-59865?

8 open source packages ship an affected version, including Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder.

PackageAffectedFixed in
Microsoft.OpenApi.Kiota NuGetAll versions1.29.1
Microsoft.OpenApi.Kiota NuGetAll versions1.29.1
Microsoft.OpenApi.Kiota NuGetFrom 1.30.01.32.5
Microsoft.OpenApi.Kiota NuGetFrom 1.30.01.32.5
Microsoft.OpenApi.Kiota.Builder NuGetAll versions1.29.1
Microsoft.OpenApi.Kiota.Builder NuGetAll versions1.29.1
2 more packages
Microsoft.OpenApi.Kiota.Builder NuGetFrom 1.30.01.32.5
Microsoft.OpenApi.Kiota.Builder NuGetFrom 1.30.01.32.5

How do I fix CVE-2026-59865?

Upgrade Microsoft.OpenApi.Kiota to a fixed version for your release line: 1.29.1 or 1.32.5.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-59865 being exploited?

There is no known exploitation of CVE-2026-59865 in the wild and no public exploit code.

Sources

Also known as GHSA-hq9q-27g5-qwpj.

Is CVE-2026-59865 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free