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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.4%top 27.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
NuGetmicrosoft.openapi.kiota1.32.0GHSA-7f3j-j7jj-r3vr
NuGetmicrosoft.openapi.kiota1.29.1GHSA-7f3j-j7jj-r3vr
NuGetmicrosoft.openapi.kiota.builder1.32.0GHSA-7f3j-j7jj-r3vr
NuGetmicrosoft.openapi.kiota.builder1.29.1GHSA-7f3j-j7jj-r3vr

Affected products (as reported)

VendorProductVersions
microsoft kiota >= 1.30.0, < 1.31.1< 1.29.1

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References