Vulnerability · Published Jul 16, 2026 · Assigned by GitHub_M
CVE-2026-59866Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName
Critical 9.3
In plain English
A critical-severity path traversal in kiota from microsoft. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 73% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| NuGet | microsoft.openapi.kiota | 1.32.5 | GHSA-4vv7-jj25-4gh6 |
| NuGet | microsoft.openapi.kiota | 1.29.1 | GHSA-4vv7-jj25-4gh6 |
| NuGet | microsoft.openapi.kiota.builder | 1.32.5 | GHSA-4vv7-jj25-4gh6 |
| NuGet | microsoft.openapi.kiota.builder | 1.29.1 | GHSA-4vv7-jj25-4gh6 |
Affected products (as reported)
Weakness: CWE-22, CWE-94 · 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
References
- https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6 x_refsource_CONFIRM
- https://github.com/microsoft/kiota/pull/7884 x_refsource_MISC
- https://github.com/microsoft/kiota/commit/dc812dbbf88ef7edf53a890d36b2f9d1460e947d x_refsource_MISC
- https://github.com/microsoft/kiota/releases/tag/v1.32.5 x_refsource_MISC