Description
Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.3, Kiota is affected by a code-generation injection vulnerability in the C# XML documentation-comment sink (the description, externalDocs label, and externalDocs link fields emitted as /// … comments). When text from an OpenAPI description is written into single-line XML doc comments without stripping newline and Unicode line-terminator characters, an attacker can break out of the /// comment line and inject additional code into generated C# clients. This issue is fixed in version 1.32.3.
Published: 2026-07-16
Score: 8.7 High
EPSS: 1.0% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Kiota is a code generator that turns OpenAPI clients. In versions prior to 1.32.3, the generator writes OpenAPI description fields directly into single‑line XML documentation comments (/// …). Because newline and Unicode line‑terminator characters are not stripped, an attacker can craft a description that breaks out of the comment and injects arbitrary code into the generated client. The injected code becomes part of the client source and will execute when the client is compiled and run, effectively enabling remote code execution on systems that use the generated code.

Affected Systems

Microsoft Kiota, any version earlier than 1.32.3. The vulnerability exists in the code‑generation component of the product and affects all consumers who compile the generated C# clients from untrusted OpenAPI descriptors.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, while the EPSS score of 1% indicates a low but nonzero likelihood of exploitation, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply a malicious OpenAPI spec to the Kiota generator, a scenario that is plausible in environments with dynamic or user‑provided specifications. Once the spec is processed, the resulting code can be compiled, allowing the injected code to execute in the client’s runtime environment.

Generated by OpenCVE AI on July 31, 2026 at 01:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update Kiota to version 1.32.3 or newer to apply the vendor fix.
  • If an immediate upgrade is not possible, validate and sanitize OpenAPI description fields by stripping newline and Unicode line‑terminator characters before passing them to Kiota.
  • Limit the use of Kiota to trusted OpenAPI specifications only, and monitor the project’s repository for additional advisories or patches.

Generated by OpenCVE AI on July 31, 2026 at 01:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3hrf-2gc2-mx32 Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection
History

Wed, 29 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 15:45:00 +0000

Type Values Removed Values Added
First Time appeared Microsoft
Microsoft kiota
Vendors & Products Microsoft
Microsoft kiota

Thu, 16 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Description Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.3, Kiota is affected by a code-generation injection vulnerability in the C# XML documentation-comment sink (the description, externalDocs label, and externalDocs link fields emitted as /// … comments). When text from an OpenAPI description is written into single-line XML doc comments without stripping newline and Unicode line-terminator characters, an attacker can break out of the /// comment line and inject additional code into generated C# clients. This issue is fixed in version 1.32.3.
Title Kiota: XML Doc-Comment Newline Breakout Code Injection
Weaknesses CWE-94
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T19:26:44.335Z

Reserved: 2026-07-07T15:41:53.606Z

Link: CVE-2026-59860

cve-icon Vulnrichment

Updated: 2026-07-16T14:52:37.729Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T02:00:05Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')