Kiota: Code Generation Literal Injection
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Microsoft | kiota | 1.30.0 to before 1.31.1; before 1.29.1 | 1.31.1, 1.29.1 | Patch available | CNA |
| — | Microsoft.OpenApi.Kiota (NuGet) | 1.30.0 to before 1.31.1 | 1.31.1 | Patch available | GHSA-2hx3-vp6r-mg3f |
| — | Microsoft.OpenApi.Kiota.Builder (NuGet) | 1.30.0 to before 1.31.1 | 1.31.1 | Patch available | GHSA-2hx3-vp6r-mg3f |
| — | Microsoft.OpenApi.Kiota (NuGet) | before 1.29.1 | 1.29.1 | Patch available | GHSA-2hx3-vp6r-mg3f |
| — | Microsoft.OpenApi.Kiota.Builder (NuGet) | before 1.29.1 | 1.29.1 | Patch available | GHSA-2hx3-vp6r-mg3f |
- kiota VendorMicrosoft Affected 1.30.0 to before 1.31.1; before 1.29.1 Fixed in 1.31.1, 1.29.1 Patch available CNA
- Microsoft.OpenApi.Kiota (NuGet) Vendor— Affected 1.30.0 to before 1.31.1 Fixed in 1.31.1 Patch available GHSA-2hx3-vp6r-mg3f
- Microsoft.OpenApi.Kiota.Builder (NuGet) Vendor— Affected 1.30.0 to before 1.31.1 Fixed in 1.31.1 Patch available GHSA-2hx3-vp6r-mg3f
- Microsoft.OpenApi.Kiota (NuGet) Vendor— Affected before 1.29.1 Fixed in 1.29.1 Patch available GHSA-2hx3-vp6r-mg3f
- Microsoft.OpenApi.Kiota.Builder (NuGet) Vendor— Affected before 1.29.1 Fixed in 1.29.1 Patch available GHSA-2hx3-vp6r-mg3f
Remediation
- Fix · CNA kiota (microsoft) Fixed in 1.31.1, 1.29.1
- Fix · GHSA-2hx3-vp6r-mg3f Microsoft.OpenApi.Kiota (NuGet) Fixed in 1.31.1 Advisory →
- Fix · GHSA-2hx3-vp6r-mg3f Microsoft.OpenApi.Kiota.Builder (NuGet) Fixed in 1.31.1 Advisory →
- Fix · GHSA-2hx3-vp6r-mg3f Microsoft.OpenApi.Kiota (NuGet) Fixed in 1.29.1 Advisory →
- Fix · GHSA-2hx3-vp6r-mg3f Microsoft.OpenApi.Kiota.Builder (NuGet) Fixed in 1.29.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-41134
- 2026-10-03 Alias added: GHSA-2hx3-vp6r-mg3f
References
Sources
- CVE-2026-41134 · CVE Program
- CVE-2026-41134 · NVD
- FIRST EPSS
- GHSA-2hx3-vp6r-mg3f · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences