{"id":"CVE-2026-59861","aliases":["GHSA-xg2h-5xr2-29jw"],"url":"https://o3.security/vulnerability/CVE-2026-59861","summary":"Kiota: Code Generation Literal Injection in Kiota Ruby Generator","details":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.0, Kiota's Ruby generator embedded OpenAPI default fields, property names, and other schema-derived strings through CodeMethodWriter.cs and SanitizeForQuotedLiteral() in Writers/StringExtensions.cs into Ruby double-quoted literals without escaping #, allowing attacker-controlled #{expr}, #$var, or #@var interpolation markers to inject arbitrary Ruby code into generated model classes. This issue is fixed in version 1.29.1 and 1.32.0.","published":"2026-07-16T14:36:32.010Z","modified":"2026-08-19T12:09:54.071105Z","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":{"url":"https://github.com/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6","label":"microsoft/kiota@fee1b64"},"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-59861.json"},{"type":"ADVISORY","url":"https://github.com/microsoft/kiota/security/advisories/GHSA-xg2h-5xr2-29jw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59861"},{"type":"FIX","url":"https://github.com/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6"},{"type":"FIX","url":"https://github.com/microsoft/kiota/pull/7746"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-19T12:09:54.071105Z"}}