Quick answers
- Is CVE-2026-59861 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-59861 being exploited in the wild.
- How severe is CVE-2026-59861?
- High severity, with a CVSS score of 7.5, published 16 July 2026.
- Which products and versions are affected?
- Microsoft Kiota < 1.32.0; Microsoft Kiota.Builder < 1.32.0; Microsoft.OpenApi.Kiota < 1.32.0; Microsoft.OpenApi.Kiota.Builder < 1.32.0; and 2 more.
- Is there a fix for CVE-2026-59861?
- Yes. Microsoft.OpenApi.Kiota (NuGet): upgrade to 1.32.0 or later; Microsoft.OpenApi.Kiota.Builder (NuGet): upgrade to 1.32.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-59861 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-59861?
- Check whether you run Microsoft Kiota, Microsoft Kiota.Builder, Microsoft.OpenApi.Kiota or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- Microsoft.OpenApi.Kiota (NuGet): upgrade to 1.32.0 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.32.0 - Microsoft.OpenApi.Kiota.Builder (NuGet): upgrade to 1.32.0 or later
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.32.0
Technical details
The Kiota Ruby code generator fails to properly escape the '#' character when embedding string values from OpenAPI default fields and property names into Ruby double-quoted string literals. Because Ruby evaluates string interpolation (e.g., #{expr}) within double-quoted strings at runtime, an attacker who controls an OpenAPI specification can inject arbitrary Ruby code into the generated model classes. The root cause is located in the SanitizeForQuotedLiteral() function within Writers/StringExtensions.cs. This vulnerability is particularly critical for CI/CD pipelines that automatically consume untrusted or remote OpenAPI specifications. Users should upgrade to version 1.32.0 or later and regenerate existing clients.
Affected products
- Microsoft Microsoft.OpenAPI.Kiota < 1.32.0
- Microsoft Microsoft.OpenAPI.Kiota.Builder < 1.32.0
Identifiers
- CVE-2026-59861
- GHSA-xg2h-5xr2-29jw
Timeline
- 2026-06-30: disclosed: Initial disclosure by baywet
- 2026-07-16: advisory: NVD publication date
- 2026-07-24: advisory: GitHub Advisory published