{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-59862","id":"CVE-2026-59862","title":"Kiota: Code Generation Literal Injection in the Python Generator","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 t","descriptionLong":"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","updated":"2026-11-07T02:48:32.903942161Z","reserved":"2026-07-07T15:41:53.606Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["microsoft kiota"],"affectedProducts":[{"vendor":"microsoft","product":"kiota","defaultStatus":null,"versions":[{"version":">= 1.30.0, < 1.31.1","status":"affected"},{"version":"< 1.29.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"NuGet","name":"Microsoft.OpenAPI.Kiota","purl":"pkg:nuget/Microsoft.OpenAPI.Kiota","ranges":[">=1.30.0 <1.32.0"],"fixed":["1.32.0"],"advisory":"GHSA-7f3j-j7jj-r3vr"},{"ecosystem":"NuGet","name":"Microsoft.OpenAPI.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenAPI.Kiota.Builder","ranges":[">=1.30.0 <1.32.0"],"fixed":["1.32.0"],"advisory":"GHSA-7f3j-j7jj-r3vr"},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","ranges":["<1.29.1"],"fixed":["1.29.1"],"advisory":"GHSA-7f3j-j7jj-r3vr"},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","ranges":["<1.29.1"],"fixed":["1.29.1"],"advisory":"GHSA-7f3j-j7jj-r3vr"}],"cwes":["CWE-94"],"aliases":["GHSA-7f3j-j7jj-r3vr"],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-7f3j-j7jj-r3vr","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.0","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59862.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59862","tags":["advisory"]},{"url":"https://github.com/microsoft/kiota","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.01376,"epssPercentile":0.72628,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-59862","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59862","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-59862","ok":true,"note":"4 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7f3j-j7jj-r3vr","ok":true,"note":"GHSA-7f3j-j7jj-r3vr"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-59862","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}