{"id":"CVE-2026-59862","aliases":["GHSA-7f3j-j7jj-r3vr"],"url":"https://o3.security/vulnerability/CVE-2026-59862","summary":"Kiota: Code Generation Literal Injection in the Python Generator","details":"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.","published":"2026-07-16T14:38:59.471Z","modified":"2026-08-19T12:09:52.666888Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"NuGet","name":"Microsoft.OpenAPI.Kiota","fixedVersion":"1.32.0"},{"ecosystem":"NuGet","name":"Microsoft.OpenAPI.Kiota.Builder","fixedVersion":"1.32.0"},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota","fixedVersion":"1.29.1"},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota.Builder","fixedVersion":"1.29.1"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/microsoft/kiota/releases/tag/v1.32.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59862.json"},{"type":"ADVISORY","url":"https://github.com/microsoft/kiota/security/advisories/GHSA-7f3j-j7jj-r3vr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59862"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-19T12:09:52.666888Z"}}