CVE-2026-59866 Details
Description
Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota emitted x-ms-kiota-info clientClassName and clientNamespaceName values without identifier or path sanitization as both generated client class or namespace names and generated output path components when `kiota generate` ran without -c/--class-name, allowing an attacker-controlled or compromised OpenAPI description to write generated source outside the -o output directory and inject arbitrary text into generated class or namespace declarations. This issue is fixed in version 1.29.1 and 1.32.5 by GenerationConfiguration.SanitizeClientClassName and SanitizeClientNamespaceName.
A vulnerability in Microsoft Kiota's OpenAPI-based HTTP client code generator, affecting versions prior to 1.32.5, allows for arbitrary file writes and code injections. The issue arises because the generator emitted 'x-ms-kiota-info' extension values for client class and namespace names without proper sanitization. This lack of sanitization could enable an attacker to manipulate the OpenAPI description, causing generated files to be written outside the designated output directory and injecting arbitrary text into the generated code. The vulnerability was confirmed in Kiota version 1.32.4, after an earlier update that had hardened some writing processes but failed to sanitize the 'clientClassName' and 'clientNamespaceName' values from the OpenAPI extension.
Users are advised to upgrade to Kiota version 1.32.5 or later, and to regenerate any affected clients.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 16, 2026CISA-ADP
Assessed Jul 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/microsoft/kiota/commit/dc812dbbf88ef7edf53a890d36b2f9d1460e947d | [email protected] | Source CodeVendor |
| https://github.com/microsoft/kiota/pull/7884 | [email protected] | Source CodeVendor |
| https://github.com/microsoft/kiota/releases/tag/v1.32.5 | [email protected] | Release NotesVendor |
| https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Microsoft Kiota | < 1.32.5 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 24, 2026 | CVE Translated | [email protected] |
| Aug 17, 2026 | CVE Modified | [email protected] |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 17, 2026 | CVE Modified | CISA-ADP |
| Jul 16, 2026 | New CVE Received | [email protected] |
Volerion