Skip to main content

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

HIGH

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

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

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.41%). Schedule for your next planned update.

Does your project use an affected Microsoft.OpenApi.Kiota version?

Paste your packages.lock.json to check it for CVE-2026-105796 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my packages.lock.json

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.

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 (51 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: NuGet (2).

PackageFixed In
Microsoft.OpenApi.Kiota NuGet · Affected: 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 · Affected: 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. It has a 1.4% probability of exploitation within 30 days (EPSS score). 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

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.41%
EPSS percentile: 72.8

This is an above-median EPSS score — 72.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

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-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

  • CVE-2026-59861
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota Ruby Generator

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json