CVE-2026-105796: Kiota Code Injection Through Doc-comment Delimiter Vulnerability
HIGHCVE-2026-105796 is a HIGH (CVSS 8.8) code injection through doc-comment delimiter vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Kiota libraries in the NuGet ecosystem. The issue involves code injection through doc-comment delimiter reformation in kiota java and php generators. Remediation is available by upgrading affected packages to version 1.35.0.
CVE-2026-105796 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-105796
To remediate this vulnerability, upgrade all affected Kiota dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Microsoft.OpenApi.Kiota to 1.35.0
Upgrade Microsoft.OpenApi.Kiota.Builder to 1.35.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Microsoft.OpenApi.Kiota
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-105796, inspect your project dependencies for Kiota:
inspect dependencies for Microsoft.OpenApi.Kiota
Analyze the terminal output to locate any version of Kiota in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.35.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Kiota, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-105796 Affected Kiota Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Microsoft.OpenApi.Kiota
|
NuGet |
≥ 0.5.0
< 1.35.0
|
1.35.0
|
|
Microsoft.OpenApi.Kiota.Builder
|
NuGet |
≥ 0.5.0
< 1.35.0
|
1.35.0
|
References
Frequently Asked Questions
What is CVE-2026-105796?
Which Kiota versions are affected?
What version fixes CVE-2026-105796?
Is Microsoft.OpenApi.Kiota affected?
Is Microsoft.OpenApi.Kiota.Builder affected?
What is the CVSS score of CVE-2026-105796?
What CWE is associated with CVE-2026-105796?
How can I check NuGet dependencies for CVE-2026-105796?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rm89-rhwj-9j92",
"modified" : "2026-10-06T15:36:00Z",
"published" : "2026-10-06T15:36:00Z",
"aliases" : [ "CVE-2026-105796" ],
"summary" : "Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators",
"details" : "### Impact\n\nAn 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.\n\nExploitation 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.\n\n### Affected versions\n\nThe 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.\n\nThe package version range below reflects the Java defect; it does not assert that PHP generation existed in every version in that range.\n\n### Patches\n\nUpgrade 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.\n\n- Fix: https://github.com/microsoft/kiota/pull/8017\n- Fixed release: https://github.com/microsoft/kiota/releases/tag/v1.35.0\n\n### Workarounds\n\nUntil 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.\n\n### Related advisories\n\nThis 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Microsoft.OpenApi.Kiota"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "1.35.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Microsoft.OpenApi.Kiota.Builder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "1.35.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/microsoft/kiota/security/advisories/GHSA-rm89-rhwj-9j92"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-105796"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/kiota/pull/8017"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/kiota/commit/68f33b865be9273464a6efbbe17379760e51f1a4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoft/kiota"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/kiota/releases/tag/v1.35.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-06T15:36:00Z",
"nvd_published_at" : "2026-10-06T15:17:16Z"
}
}