{"id":"CVE-2026-59862","published":"2026-07-16T14:38:59Z","modified":"2026-08-17T15:02:15Z","title":"Kiota: Code Generation Literal Injection in the Python Generator","vendor":"Microsoft","product":"kiota","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01376,"percentile":0.72713,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-7f3j-j7jj-r3vr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.0","tags":["x_refsource_MISC"]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":14.54},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"microsoft","affectedVersions":[{"vendor":"microsoft","product":"kiota","versions":[">= 1.30.0, < 1.31.1","< 1.29.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-17T03:56:36.677843Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"NuGet","package":"Microsoft.OpenAPI.Kiota","vulnerableRanges":[">=1.30.0, <1.32.0","<1.29.1"],"patched":["1.32.0","1.29.1"],"from":["GHSA-7f3j-j7jj-r3vr"],"provenance":"source"},{"ecosystem":"NuGet","package":"Microsoft.OpenAPI.Kiota.Builder","vulnerableRanges":[">=1.30.0, <1.32.0","<1.29.1"],"patched":["1.32.0","1.29.1"],"from":["GHSA-7f3j-j7jj-r3vr"],"provenance":"source"}],"summary":{"text":"Kiota, Microsoft's OpenAPI-based HTTP client code generator, fails to sanitise newline characters in enum value descriptions taken from x-ms-enum definitions when its Python generator emits inline comments. An attacker who can supply a crafted OpenAPI specification can use this to inject Python code that runs at module scope when the generated modules are imported, with no authentication or user interaction required beyond that import.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:05Z"},"euvd":{"id":"EUVD-2026-44927","exploited":false,"provenance":"source"}}