CVE-2026-59865: CWE-94: Improper Control of Generation of Code ('Code Injection') in microsoft kiota
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.
AI Analysis
Technical Summary
The vulnerability in Microsoft Kiota (CVE-2026-59865) involves improper control of code generation (CWE-94) where the 'kiota info' command reads the 'dependencyInstallCommand' from the 'x-ms-kiota-info' extension in an OpenAPI description and presents it as the recommended install command. An attacker-controlled or compromised OpenAPI spec can supply a malicious shell command, which developers might execute, resulting in remote code execution (RCE). The Kiota VS Code extension also exposes this command in its JSON output and can run it automatically, increasing risk. This vulnerability affects Kiota versions prior to 1.32.5. The fix, introduced in versions 1.29.1 and 1.32.5, removes support for spec-supplied install commands, ensuring only Kiota's trusted package-manager commands are used.
Potential Impact
If a developer runs 'kiota info' on a malicious or compromised OpenAPI description and follows the suggested install command, they may execute arbitrary shell commands on their workstation or CI environment, leading to remote code execution. The Kiota VS Code extension can automatically run the malicious command, increasing the risk of exploitation. This vulnerability requires the OpenAPI description to be attacker-controlled or tampered with and the developer to run the suggested command. The impact is critical due to the potential for full code execution without user privileges or interaction beyond running the suggested command.
Mitigation Recommendations
Upgrade Microsoft Kiota to version 1.29.1, 1.32.5, or later. Also update the Kiota VS Code extension to a version built against Kiota 1.32.5 or newer. These updates remove support for spec-supplied install commands, eliminating the vulnerability. Do not run install commands suggested by untrusted OpenAPI descriptions. Patch status is confirmed fixed in these versions.
CVE-2026-59865: CWE-94: Improper Control of Generation of Code ('Code Injection') in microsoft kiota
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.
CVSS v4.0
Score 9.3critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Microsoft Kiota (CVE-2026-59865) involves improper control of code generation (CWE-94) where the 'kiota info' command reads the 'dependencyInstallCommand' from the 'x-ms-kiota-info' extension in an OpenAPI description and presents it as the recommended install command. An attacker-controlled or compromised OpenAPI spec can supply a malicious shell command, which developers might execute, resulting in remote code execution (RCE). The Kiota VS Code extension also exposes this command in its JSON output and can run it automatically, increasing risk. This vulnerability affects Kiota versions prior to 1.32.5. The fix, introduced in versions 1.29.1 and 1.32.5, removes support for spec-supplied install commands, ensuring only Kiota's trusted package-manager commands are used.
Potential Impact
If a developer runs 'kiota info' on a malicious or compromised OpenAPI description and follows the suggested install command, they may execute arbitrary shell commands on their workstation or CI environment, leading to remote code execution. The Kiota VS Code extension can automatically run the malicious command, increasing the risk of exploitation. This vulnerability requires the OpenAPI description to be attacker-controlled or tampered with and the developer to run the suggested command. The impact is critical due to the potential for full code execution without user privileges or interaction beyond running the suggested command.
Mitigation Recommendations
Upgrade Microsoft Kiota to version 1.29.1, 1.32.5, or later. Also update the Kiota VS Code extension to a version built against Kiota 1.32.5 or newer. These updates remove support for spec-supplied install commands, eliminating the vulnerability. Do not run install commands suggested by untrusted OpenAPI descriptions. Patch status is confirmed fixed in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-07T15:41:53.607Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a58f9c068715ace434105ee
Added to database: 07/16/2026, 15:33:20 UTC
Last enriched: 08/17/2026, 16:24:13 UTC
Last updated: 08/30/2026, 22:52:12 UTC
Views: 81
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.