CVE-2026-59861 json
Kiota: Code Generation Literal Injection in Kiota Ruby Generator
published 2026-07-16 3 mo ago modified 2026-10-24 15 d ago also EUVD-2026-44926 , GHSA-xg2h-5xr2-29jw
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- nuget Microsoft.OpenAPI.Kiota 1.32.0
- nuget Microsoft.OpenAPI.Kiota.Builder 1.32.0
- nuget Microsoft.OpenApi.Kiota 1.29.1
- nuget Microsoft.OpenApi.Kiota.Builder 1.29.1
- microsoft kiota 1.29.1, 1.32.0
- microsoft microsoft.openapi.kiota 1.29.1, 1.32.0
- microsoft microsoft.openapi.kiota.builder 1.29.1, 1.32.0
- github.com/microsoft/kiota@fee1b64 commit
- github.com/microsoft/kiota#7746 pull request
- github.com/microsoft/kiota/releases/tag/v1.32.0 release
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- total
- Assessed
- 3 mo ago
Exploit prediction
2.05% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| nuget | Microsoft.OpenAPI.Kiota | >=1.30.0, <1.32.0 |
1.32.0 |
| nuget | Microsoft.OpenAPI.Kiota.Builder | >=1.30.0, <1.32.0 |
1.32.0 |
| nuget | Microsoft.OpenApi.Kiota | <1.29.1 |
1.29.1 |
| nuget | Microsoft.OpenApi.Kiota.Builder | <1.29.1 |
1.29.1 |
Affected products
- microsoft kiota
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/microsoft/kiota/pull/7746
web
-
github.com
/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6
web
-
github.com
/microsoft/kiota/security/advisories/GHSA-xg2h-5xr2-29jw
web
-
github.com
/microsoft/kiota/releases/tag/v1.32.0
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-59861
advisory
-
github.com
/microsoft/kiota
package
Sources
- CVE List CVE-2026-59861
- GitHub Advisory GHSA-xg2h-5xr2-29jw
- NVD CVE-2026-59861
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.