Skip to content
Fencer Intel
high 7.5

CVE-2026-59862 json

Kiota: Code Generation Literal Injection in the Python Generator

published 4mo ago modified 18d ago also EUVD-2026-44927 , GHSA-7f3j-j7jj-r3vr

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.4%
EPSS 1.4% chance of exploitation in 30 days, percentile 72%
public exploits
0
none known

Summary

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.

Patch / fix

  • nuget Microsoft.OpenAPI.Kiota 1.32.0
  • nuget Microsoft.OpenAPI.Kiota.Builder 1.32.0
  • nuget Microsoft.OpenApi.Kiota 1.29.1
  • nuget Microsoft.OpenApi.Kiota.Builder 1.29.1
  • microsoft kiota 1.29.1, 1.32.0
  • microsoft microsoft.openapi.kiota 1.29.1, 1.32.0
  • microsoft microsoft.openapi.kiota.builder 1.29.1, 1.32.0

Is CVE-2026-59862 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
3mo ago

Exploit prediction

1.38% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-11).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
nuget Microsoft.OpenAPI.Kiota
>=1.30.0, <1.32.0
1.32.0
nuget Microsoft.OpenAPI.Kiota.Builder
>=1.30.0, <1.32.0
1.32.0
nuget Microsoft.OpenApi.Kiota
<1.29.1
1.29.1
nuget Microsoft.OpenApi.Kiota.Builder
<1.29.1
1.29.1

Affected products

  • microsoft kiota

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

The maintainers of microsoft/kiota published their own advisory on GitHub. Reviewed sources take precedence over it.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.