Vulnerability · Published Apr 22, 2026 · Assigned by GitHub_M

CVE-2026-41134Kiota: Code Generation Literal Injection

High 7.3

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 0.4% (higher than 37% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)7.3High
Exploit odds (30 days)0.4%top 63.4% 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. Versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks (for example: serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission). When malicious values from an OpenAPI description are emitted into generated source without context-appropriate escaping, an attacker can break out of string literals and inject additional code into generated clients. This issue is only practically exploitable when the OpenAPI description used for generation is from an untrusted source, or a normally trusted OpenAPI description has been compromised/tampered with. Only generating from trusted, integrity-protected API descriptions significantly reduces the risk. To remediate the issue, upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients as a precaution. Refreshing generated clients ensures previously generated vulnerable code is replaced with hardened output.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGetmicrosoft.openapi.kiota1.31.1GHSA-2hx3-vp6r-mg3f
NuGetmicrosoft.openapi.kiota1.29.1GHSA-2hx3-vp6r-mg3f
NuGetmicrosoft.openapi.kiota.builder1.31.1GHSA-2hx3-vp6r-mg3f
NuGetmicrosoft.openapi.kiota.builder1.29.1GHSA-2hx3-vp6r-mg3f

Affected products (as reported)

VendorProductVersions
microsoft kiota >= 1.30.0, < 1.31.1< 1.29.1

Weakness: CWE-94 · Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References