Code Injection Vulnerability in Kiota Python Code Generator by Microsoft
CVE-2026-59862
7.5HIGH
What is CVE-2026-59862?
The Kiota Python generator, prior to version 1.32.0, suffers from a code injection vulnerability due to improper sanitization of user-controlled enum value descriptions. Attackers could exploit this flaw by injecting malicious code through x-ms-enum.values[].description, which would then be processed without newline sanitization. This could lead to arbitrary code execution at module scope whenever a generated module is imported. The issue has been addressed in version 1.32.0, ensuring that enum descriptions are properly sanitized to prevent such exploits.
Affected Version(s)
kiota < 1.32.0