CVE-2026-105796 — Vulnerability in Microsoft.OpenApi.Kiota
Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators
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.
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 (51 days ago).
- Last revised October 6, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Microsoft.OpenApi.Kiota --version 1.35.0
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).
| Package | Fixed 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.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/microsoft/kiota/security/advisories/GHSA-rm89-rhwj-9j92WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-105796ADVISORY
- https://github.com/microsoft/kiota/pull/8017WEB
- https://github.com/microsoft/kiota/commit/68f33b865be9273464a6efbbe17379760e51f1a4WEB
- https://github.com/microsoft/kiotaPACKAGE
- https://github.com/microsoft/kiota/releases/tag/v1.35.0WEB
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
Significant impact if exploited, or exploitable with modest effort.
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
Related CVEs
- CVE-2026-59864CRITICAL
Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions
- CVE-2026-59865CRITICAL
Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`
- CVE-2026-59860HIGH
Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection
- CVE-2026-59863HIGH
Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF
- CVE-2026-59866HIGH
Microsoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName
- CVE-2026-59859HIGH
Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator
- CVE-2026-59867HIGH
Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
- CVE-2026-59861HIGH
Microsoft Kiota: Code Generation Literal Injection in Kiota Ruby Generator