CVE-2026-41134
HighCVSS 7.8Exploitation Probability (EPSS)
Low risk35th percentile - higher than 35% of all known CVEs
Summary
Kiota versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks. When malicious values from an OpenAPI description are emitted without proper escaping, an attacker can break out of string literals and inject additional code into generated clients.
Risk Assessment
The vulnerability is practically exploitable only when the OpenAPI description is from an untrusted source or has been tampered with. It can lead to injection of malicious code into generated clients.
Recommendation
Upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients to replace vulnerable code.
Other vulnerabilities in Kiota
See all- CVE-2026-73851Medium
Kiota before versions 1.29.1 and 1.34.0 allows an attacker who controls or tampers with the OpenAPI description to supply a file reference that resolves outside the manifest package (e.g., ../../../../etc/passwd, an absolute path, or a file:// / http(s):// URI). When the generated manifest is deployed and consumed by an AI host, this can lead to inclusion or disclosure of files outside the intended package boundary.
- CVE-2026-59866Critical
Kiota before versions 1.29.1 and 1.32.5 did not sanitize clientClassName and clientNamespaceName values from OpenAPI descriptions, allowing generated source to be written outside the output directory and arbitrary text to be injected into class or namespace declarations.
- CVE-2026-59865Critical
Kiota before versions 1.29.1 and 1.32.5 displayed dependency install commands from an OpenAPI description as recommended, allowing command injection when the suggested command was run manually or via the VS Code extension.
- CVE-2026-59864Critical
Kiota before versions 1.29.1 and 1.32.5 in plugin add and plugin generate commands did not validate paths in the static_template.file field, allowing path traversal or out-of-package file inclusion in generated plugin manifests.
- CVE-2026-59867High
Kiota before versions 1.29.1 and 1.32.5 resolved OpenAPI $ref values by fetching remote URLs and reading local file paths, allowing SSRF, remote file inclusion, and local file inclusion during client generation.
- CVE-2026-59863High
Kiota before versions 1.29.1 and 1.32.5 honored a poisoned workspace.json configuration without validating output paths, allowing generated files to be written outside the workspace root on a developer or CI host.
- CVE-2026-59862High
Kiota before versions 1.29.1 and 1.32.0 in the Python generator did not sanitize enum value descriptions, allowing Python code injection into generated comments that could be executed when modules are imported.
- CVE-2026-59861High
Kiota before versions 1.29.1 and 1.32.0 in the Ruby generator did not escape the # character in string literals, allowing arbitrary Ruby code injection into generated model classes.
- CVE-2026-59860High
Kiota before versions 1.29.1 and 1.32.3 has a code-generation injection vulnerability in the C# XML documentation-comment sink, where text from an OpenAPI description is written without stripping newline characters, allowing injection of additional code into generated C# clients.
- CVE-2026-59859High
Kiota, an OpenAPI based HTTP client code generator, prior to versions 1.29.1 and 1.32.4 contains a PHP code injection vulnerability. The PHP generator fails to escape the $ character in double-quoted strings, allowing attacker-controlled interpolation constructs to inject arbitrary PHP code into generated model and request-builder classes.
Original NVD description (English source)
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.

