Microsoft Kiota Command Injection Flaw
A critical vulnerability in Microsoft Kiota allows attackers to execute arbitrary code via malicious OpenAPI descriptions processed by the tool.
Microsoft Kiota versions 1.32.4 and earlier are vulnerable to a critical command injection flaw, tracked as CVE-2026-59865. The vulnerability exists within the kiota info command, which incorrectly processes untrusted data from OpenAPI descriptions to suggest installation commands for dependencies, potentially leading to remote code execution on a developer's machine.
What's at Risk
The affected packages are nuget/Microsoft.OpenApi.Kiota and nuget/Microsoft.OpenApi.Kiota.Builder. Developers who utilize these packages to generate client code are at risk if they process OpenAPI descriptions from untrusted or compromised sources.
Because the Kiota VS Code extension consumes the kiota info --json output, the vulnerability extends beyond the command line. An automated dependency installation action within an IDE could inadvertently trigger the malicious shell command, exposing the developer's local environment to complete compromise.
How the Flaw Works
Command injection occurs when an application passes unsafe user-supplied data—such as form inputs, HTTP headers, or in this case, configuration files—to a system shell. When the application fails to properly validate or sanitize this input, an attacker can append their own commands to the intended instruction.
In a general sense, this class of vulnerability allows an attacker to break out of the intended application context. By injecting shell metacharacters, the attacker can force the host operating system to execute arbitrary code with the privileges of the user running the application. This is a common risk in build tools and automation utilities that rely on external metadata to configure local development environments.
How to Protect Your Systems
- Update both Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder to version 1.32.5 or later immediately.
- Exercise extreme caution when running
kiota infoor related IDE actions on OpenAPI descriptions obtained from untrusted or public sources. - Review and validate the integrity of any OpenAPI specification file before processing it with automation tools.
- Implement standard least privilege practices for developer workstations to limit the potential impact of a successful code execution event.
- Monitor development environments for unexpected shell activity or unauthorized process execution following the use of third-party build tools.
Given the critical severity of this flaw and the potential for remote code execution, patching is the only effective way to remove the underlying vulnerability. Developers should prioritize upgrading their dependencies to ensure that the kiota info command no longer trusts spec-supplied installation instructions.
Sources
- GitHub Security Advisories Original source
Continue Reading
Critical Path Injection Found in Microsoft Kiota
Microsoft has patched a critical path traversal vulnerability in Kiota that allows malicious OpenAPI descriptions to inject unauthorized file references.
Critical RCE Flaw Patched in Prompty Core
A server-side template injection vulnerability in the @prompty/core Nunjucks renderer allows attackers to execute arbitrary code on the host system.
Critical Auth Bypass Found in kin-openapi
A failure in the kin-openapi ValidationHandler allows unauthenticated attackers to bypass security requirements, earning a critical 9.1 CVSS score.