Skip to main content
VulnerabilityPublished Updated

CVE-2026-59862: microsoft kiota · Code Injection

Affects microsoft kiotaSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.5 High : upgrade to 1.31.1 or 1.29.1 soon.

Data as of 28 Nov 2026, 18:37 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.3% chance of exploitation in 30 days – higher than 72% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.31.1, 1.29.1, 1.32.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 16 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 28 Nov 2026.

What to do

Upgrade kiota to 1.31.1 or 1.29.1; Microsoft.OpenAPI.Kiota and Microsoft.OpenAPI.Kiota.Builder to 1.32.0; Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder to 1.29.1.

Affected software

ProductAffectedFixed in
microsoftkiotaAffected
  • >=1.30.0 <1.31.1
Fixed in
  • 1.31.1
microsoftkiotaAffected
  • <1.29.1
Fixed in
  • 1.29.1
NuGetMicrosoft.OpenAPI.Kiotapkg:nuget/Microsoft.OpenAPI.KiotaOther threatsAffected
  • >=1.30.0 <1.32.0
  • =1.30.0
  • =1.31.0
  • =1.31.1
Fixed in
  • 1.32.0
NuGetMicrosoft.OpenApi.Kiotapkg:nuget/Microsoft.OpenApi.KiotaOther threatsAffected
  • <1.29.1
Fixed in
  • 1.29.1
NuGetMicrosoft.OpenAPI.Kiota.Builderpkg:nuget/Microsoft.OpenAPI.Kiota.BuilderOther threatsAffected
  • >=1.30.0 <1.32.0
Fixed in
  • 1.32.0
NuGetMicrosoft.OpenApi.Kiota.Builderpkg:nuget/Microsoft.OpenApi.Kiota.BuilderOther threatsAffected
  • <1.29.1
Fixed in
  • 1.29.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade Kiota to version 1.29.1, 1.32.0, or later to apply the official fix. Regenerate any previously generated Python clients to remove vulnerable code. If immediate upgrade is not possible, only generate clients from trusted, internally controlled OpenAPI specifications, disable or gate automatic generation from remote specs in CI/CD pipelines, validate and sanitize x-ms-enum descriptions before generation, and review generated Python files for suspicious top-level code near enum declarations. Run generation and validation in isolated environments without access to production secrets. Confirm after upgrade that malicious multi-line enum descriptions no longer produce executable top-level output.

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.

References

Community reviews

Loading reviews…