Vulnerability · Published Jul 16, 2026 · Assigned by GitHub_M

CVE-2026-59861Kiota: Code Generation Literal Injection in Kiota Ruby Generator

High 7.5

In plain English

A high-severity code injection in kiota from microsoft. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.0% (higher than 81% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)2.0%top 18.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGetmicrosoft.openapi.kiota1.32.0GHSA-xg2h-5xr2-29jw
NuGetmicrosoft.openapi.kiota1.29.1GHSA-xg2h-5xr2-29jw
NuGetmicrosoft.openapi.kiota.builder1.32.0GHSA-xg2h-5xr2-29jw
NuGetmicrosoft.openapi.kiota.builder1.29.1GHSA-xg2h-5xr2-29jw

Affected products (as reported)

VendorProductVersions
microsoft kiota >= 1.30.0, < 1.31.1< 1.29.1

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References