CVE-2026-59861
HIGH 7.5CVSS 3.1Microsoft Kiota: Code Generation Literal Injection in Kiota Ruby Generator
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
- 16 Jul 2026
- Last modified
- 24 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-94
- Also known as
- GHSA-xg2h-5xr2-29jw
- Sources
- NVDJSONOSV GHSA-xg2h-5xr2-29jwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | NuGet | Microsoft.OpenAPI.Kiota | >= 1.30.0, < 1.32.0 | 1.32.0 |
| OSV | NuGet | Microsoft.OpenAPI.Kiota.Builder | >= 1.30.0, < 1.32.0 | 1.32.0 |
| OSV | NuGet | Microsoft.OpenApi.Kiota | < 1.29.1 | 1.29.1 |
| OSV | NuGet | Microsoft.OpenApi.Kiota.Builder | < 1.29.1 | 1.29.1 |
References
- https://github.com/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6 · WEB
- https://github.com/microsoft/kiota/pull/7746 · WEB
- https://github.com/microsoft/kiota/releases/tag/v1.32.0 · WEB
- https://github.com/microsoft/kiota/security/advisories/GHSA-xg2h-5xr2-29jw · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-59861 · ADVISORY
- https://github.com/microsoft/kiota · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 16 Jul 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 24 Jul 2026)