Vulnerability · Published Jul 16, 2026 · Assigned by GitHub_M
CVE-2026-59862Kiota: Code Generation Literal Injection in the Python Generator
High 7.5
In plain English
A high-severity code injection 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 72% 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.0, Kiota's Python generator let attacker-controlled enum value descriptions from x-ms-enum.values[].description flow through KiotaBuilder.SetEnumOptions into Documentation.DescriptionTemplate and PythonConventionService.RemoveInvalidDescriptionCharacters without newline sanitization, allowing generated inline comments to split and execute attacker-controlled Python code at module scope when generated modules were imported. This issue is fixed in version 1.29.1 and 1.32.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| NuGet | microsoft.openapi.kiota | 1.32.0 | GHSA-7f3j-j7jj-r3vr |
| NuGet | microsoft.openapi.kiota | 1.29.1 | GHSA-7f3j-j7jj-r3vr |
| NuGet | microsoft.openapi.kiota.builder | 1.32.0 | GHSA-7f3j-j7jj-r3vr |
| NuGet | microsoft.openapi.kiota.builder | 1.29.1 | GHSA-7f3j-j7jj-r3vr |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/microsoft/kiota/security/advisories/GHSA-7f3j-j7jj-r3vr x_refsource_CONFIRM
- https://github.com/microsoft/kiota/releases/tag/v1.32.0 x_refsource_MISC