Description
Kiota is an OpenAPI based HTTP Client code generator. From 0.5.0 until 1.35.0, Kiota's Java and PHP documentation-comment sanitizers delete block-comment terminators rather than neutralizing them, allowing overlapping characters to reform a terminator and place attacker-controlled OpenAPI text outside a generated documentation comment. The Java sanitizer also removes non-ASCII characters after deleting terminators, which can create a new terminator during normalization. Exploitation requires a developer or build pipeline to generate source from the malicious description and then compile and load the Java output or load the PHP output, after which injected code executes in the consuming application or build environment context. The version range is based on the Java defect and does not assert that PHP generation existed in every affected release. This issue is fixed in version 1.35.0.
Published: 2026-10-06
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Code Execution
Action: Immediate Patch
AI Analysis

Impact

The vulnerability occurs in Kiota, an OpenAPI‑based HTTP client generator, where the Java and PHP documentation‑comment sanitizers remove block‑comment terminators instead of neutralizing them. This allows attacker‑controlled OpenAPI text to form a terminator that re‑opens a documentation comment, placing malicious code outside the comment during generated source compilation. The defect also deletes non‑ASCII characters after terminator removal, further enabling terminator regeneration. Exploitation requires the malicious OpenAPI description to be processed by Kiota in a build environment or by a developer, producing code that is subsequently compiled or evaluated. When the compiled Java class or the loaded PHP code is executed, the injected snippets run in the context of the consuming application or build pipeline, potentially compromising the entire environment.

Affected Systems

Affected products include Microsoft.OpenApi.Kiota, Microsoft.OpenApi.Kiota.Builder, and kiota from Microsoft. The vulnerability spans Kiota versions 0.5.0 through 1.35.0, with the defect driven by the Java sanitizer; it is not certain that PHP generation was present in all affected releases of that range. The issue was addressed in release 1.35.0.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog, but the attack can be carried out by any developer or CI/CD pipeline that feeds a malicious OpenAPI spec to Kiota. Once the generated code is compiled or loaded, the injected code executes with the privileges of the application or build process. Given the need to run Kiota to produce client code, the crash or exploitation path is realistic in environments where OpenAPI definitions are sourced from untrusted inputs.

Generated by OpenCVE AI on October 6, 2026 at 18:28 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Kiota to version 1.35.0 or later, where the sanitization logic is corrected.
  • Validate or restrict OpenAPI definitions to trusted sources before feeding them to Kiota, ensuring that malicious content cannot be injected.
  • Isolate the generation step by running Kiota in a sandboxed or separate build environment, so that any injected code cannot affect the main application or host system.

Generated by OpenCVE AI on October 6, 2026 at 18:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rm89-rhwj-9j92 Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators
History

Fri, 09 Oct 2026 09:15:00 +0000

Type Values Removed Values Added
First Time appeared Microsoft
Microsoft kiota
Microsoft microsoft.openapi.kiota
Microsoft microsoft.openapi.kiota.builder
Vendors & Products Microsoft
Microsoft kiota
Microsoft microsoft.openapi.kiota
Microsoft microsoft.openapi.kiota.builder

Fri, 09 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 06 Oct 2026 14:30:00 +0000

Type Values Removed Values Added
Description Kiota is an OpenAPI based HTTP Client code generator. From 0.5.0 until 1.35.0, Kiota's Java and PHP documentation-comment sanitizers delete block-comment terminators rather than neutralizing them, allowing overlapping characters to reform a terminator and place attacker-controlled OpenAPI text outside a generated documentation comment. The Java sanitizer also removes non-ASCII characters after deleting terminators, which can create a new terminator during normalization. Exploitation requires a developer or build pipeline to generate source from the malicious description and then compile and load the Java output or load the PHP output, after which injected code executes in the consuming application or build environment context. The version range is based on the Java defect and does not assert that PHP generation existed in every affected release. This issue is fixed in version 1.35.0.
Title Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Microsoft Kiota Microsoft.openapi.kiota Microsoft.openapi.kiota.builder
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-09T01:03:51.338Z

Reserved: 2026-10-05T20:37:19.364Z

Link: CVE-2026-105796

cve-icon Vulnrichment

Updated: 2026-10-09T01:03:46.551Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-06T15:17:16.590

Modified: 2026-10-09T02:16:54.973

Link: CVE-2026-105796

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-09T08:44:22Z

Weaknesses
  • CWE-94

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