Loading...
Skip to main content

CVE-2026-105796 — Vulnerability in Microsoft.OpenApi.Kiota — CVE...

HIGH

Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators

Published October 6, 2026Updated October 6, 2026Source: osv

Summary

### Impact An attacker who controls or tampers with an OpenAPI description can cause Kiota to emit attacker-controlled Java or PHP source outside a generated documentation comment. The affected sanitizers remove comment terminators rather than neutralizing them, allowing a terminator to reform from overlapping characters or from subsequent normalization. The Java sanitizer also removes non-ASCII characters after removing terminators, which can create a new terminator. Exploitation requires a developer or build pipeline to generate a client from the malicious description and subsequently compile and load the Java output, or load the PHP output. Code executes in the consuming application's or build environment's security context, not merely because Kiota reads the description. ### Affected versions The affected NuGet packages are `Microsoft.OpenApi.Kiota` and `Microsoft.OpenApi.Kiota.Builder`. The Java normalization-order defect was introduced in version 0.5.0 and remains present through version 1.34.1, including the separate 1.29.1 security-backport release. The PHP delimiter-reformation variant is also present in version 1.34.1 and 1.29.1. Version 1.35.0 fixes both variants. The package version range below reflects the Java defect; it does not assert that PHP generation existed in every version in that range. ### Patches Upgrade to Kiota 1.35.0 or later and regenerate affected clients. The fix neutralizes block-comment delimiters instead of deleting them, and performs Java delimiter neutralization after non-ASCII normalization. - Fix: https://github.com/microsoft/kiota/pull/8017 - Fixed release: https://github.com/microsoft/kiota/releases/tag/v1.35.0 ### Workarounds Until upgrading, generate clients only from trusted, integrity-protected OpenAPI descriptions. Review generated Java and PHP source before compiling, loading, or deploying it. Restrict the privileges and secrets available to generation and build environments. ### Related advisories This is distinct from PHP double-quoted string interpolation (GHSA-jqwh-526h-c92j) and C# XML documentation newline breakout (GHSA-3hrf-2gc2-mx32). Those fixes do not address Java/PHP block-comment delimiter reformation.

Advisory Timeline

  • First published October 6, 2026 (6 days ago).
  • Last revised October 6, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Microsoft.OpenApi.Kiota to 1.35.0 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.35.0
NuGet
Update Microsoft.OpenApi.Kiota.Builder to 1.35.0 or later
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.35.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (2).

PackageEcosystemAffectedFixed In
Microsoft.OpenApi.Kiota
nuget
0.10.0-preview, 0.11.0-preview, 0.11.1-preview, 0.5.1-preview (+66 more)1.35.0
Microsoft.OpenApi.Kiota.Builder
nuget
0.5.1-preview, 0.6.0-preview, 0.7.1-preview, 1.0.0 (+38 more)1.35.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-105796?
Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-105796?
CVE-2026-105796 affects Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-105796 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-rm89-rhwj-9j92

Related CVEs

  • CVE-2026-59864
    CRITICAL

    Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions

  • CVE-2026-59865
    CRITICAL

    Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`

  • CVE-2026-59860
    HIGH

    Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection

  • CVE-2026-59863
    HIGH

    Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF

  • CVE-2026-59866
    HIGH

    Microsoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName

  • CVE-2026-59862
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota Python Generator

  • CVE-2026-59859
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator

  • CVE-2026-59867
    HIGH

    Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies