Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
7.3
CVE-2026-41134: Kiota client generator may embed malicious code
CVE-2026-41134 · published 6 months ago
Summary
If you use Kiota to create API client code from an untrusted or tampered OpenAPI description, the generated source can include unexpected code that could be run by your application. Updating Kiota to version 1.29.1, 1.31.1 or later and re‑creating any previously generated clients removes this risk.
What to do
- Update havendv kiota to version 1.31.1.
- Update microsoft microsoft.openapi.kiota to version 1.31.1.
- Update microsoft microsoft.openapi.kiota to version 1.29.1.
- Update microsoft microsoft.openapi.kiota.builder to version 1.31.1.
- Update microsoft microsoft.openapi.kiota.builder to version 1.29.1.
- Update microsoft kiota to version 1.31.1 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| NuGet | havendv | kiota |
< 1.31.1 Fix: upgrade to 1.31.1
|
| – | microsoft | kiota |
< 1.31.1 >= 1.30.0, < 1.31.1 cpe:2.3:a:microsoft:kiota:*:*:*:*:*:*:*:* |
| NuGet | microsoft | microsoft.openapi.kiota |
>= 1.30.0, < 1.31.1 < 1.29.1 Fix: upgrade to 1.31.1
|
| NuGet | microsoft | microsoft.openapi.kiota.builder |
>= 1.30.0, < 1.31.1 < 1.29.1 Fix: upgrade to 1.31.1
|
Original advisory text
Kiota: Code Generation Literal Injection
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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-41134 Vendor Advisory
- https://github.com/microsoft/kiota Product
- https://github.com/microsoft/kiota/security/advisories/GHSA-2hx3-vp6r-mg3f Exploit Vendor Advisory
Internet-facing
14 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker full control
Severity
7.3
High
Type
CWE-94Code Injection
Timeline
Published22 Apr 2026
Updated4 Nov 2026
First seen5 May 2026
Track software like this
Free during beta