CVE-2026-59862
Published:July 16, 2026
Updated:August 04, 2026
Kiota is an OpenAPI based HTTP Client code generator. Prior to 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.32.0.
Affected Packages
Microsoft.OpenApi.Kiota.Builder (DOT_NET):
Affected version(s) >=0.2.0.0 <1.32.0Fix Suggestion:
Update to version 1.32.0Microsoft.OpenApi.Kiota (DOT_NET):
Affected version(s) >=0.1.0.0 <1.32.0Fix Suggestion:
Update to version 1.32.0https://github.com/microsoft/kiota.git (GITHUB):
Affected version(s) >=v0.0.1 <v1.32.0Fix Suggestion:
Update to version v1.32.0microsoft.openapi.kiota.builder (NUGET):
Affected version(s) >=0.2.0-preview <1.32.0Fix Suggestion:
Update to version 1.32.0microsoft.openapi.kiota (NUGET):
Affected version(s) >=0.1.0-preview <1.32.0Fix Suggestion:
Update to version 1.32.0microsoft.openapi.kiota.builder (NUGET):
Affected version(s) >=0.2.0-preview <1.32.0Fix Suggestion:
Update to version 1.32.0microsoft.openapi.kiota (NUGET):
Affected version(s) >=0.1.0-preview <1.32.0Fix Suggestion:
Update to version 1.32.0Related Resources (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Improper Control of Generation of Code ('Code Injection')
EPSS
Base Score:
1.02