Skip to main content

Microsoft Kiota CVE-2026-105796

| EUVDEUVD-2026-93425 HIGH
Code Injection (CWE-94)
2026-10-06 GitHub_M GHSA-rm89-rhwj-9j92
8.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious OpenAPI description
  2. Delivery
    Developer generates Kiota Java/PHP client
  3. Exploit
    Crafted text re-forms comment terminator
  4. Execution
    Injected code escapes doc comment
  5. Persist
    Compile and load generated source
  6. Impact
    Arbitrary code runs in build/app context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that a developer or build pipeline generate Kiota Java or PHP client source from an attacker-influenced OpenAPI description, and then - for Java - compile and load that output, or - for PHP - load the output; code only executes after this generate-then-build/load step. The concrete trigger is OpenAPI documentation/description text containing overlapping delimiter sequences (e.g. '**//', or for Java a non-ASCII-adjacent '*é/') that the pre-1.35.0 sanitizer deletes rather than neutralizes, letting a '*/' terminator re-form and push attacker text outside the generated doc comment. Limiting factors: the victim must consume an untrusted or tampered OpenAPI spec, must use the Java or PHP generators specifically (other language writers are not implicated by this fix), and must actually build/load the generated artifact - so the flaw is confined to build-time/supply-chain workflows and does not affect already-deployed runtime services unless they regenerate from hostile specs. Affected versions are 0.5.0 through pre-1.35.0; 1.35.0 fixes it.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) describes a network-reachable, low-complexity, unauthenticated code-injection flaw whose only gating factor is required user interaction - a developer or CI pipeline must feed a malicious OpenAPI description into Kiota, then generate, compile and load the output (Java) or load the output (PHP). The network vector reflects that malicious OpenAPI specs are typically retrieved from remote/third-party URLs, but real-world triggering is not autonomous: it depends on the specific development workflow of consuming an untrusted API description, so this behaves more like a supply-chain/build-time injection than a directly remotely-exploitable service bug. No EPSS score, KEV listing, POC flag, or SSVC decision data was provided in the input, so exploitation probability and automatability cannot be quantified from these sources - treat the 8.8 as a capability ceiling rather than evidence of active, widespread exploitation. The root cause is well-documented by the vendor PR and tests (deleting block-comment terminators instead of neutralizing them, allowing '**//' to collapse back to '*/', plus a Java non-ASCII strip that re-forms terminators), which raises confidence in the technical impact; absence of any exploitation telemetry in the input keeps the practical priority moderate and dependent on whether an organization generates Kiota clients from untrusted specs.

Exploit ScenarioDerived

An attacker publishes or tampers with an OpenAPI description so that a schema field's documentation text contains crafted sequences (e.g. '**//' or '*é/') that survive Kiota's flawed sanitizer and re-form a '*/' block-comment terminator. A developer or CI pipeline generates a Java or PHP client from that description; the injected text escapes the generated doc comment into live code and executes in the consuming application or build environment when the Java output is compiled/loaded or the PHP output is loaded. No public exploit was identified in the provided data, though the vendor's regression tests concretely demonstrate the breakout sequences.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 06, 2026

Code injection in Microsoft Kiota 0.5.0 through pre-1.35.0 allows attacker-controlled text embedded in an OpenAPI description to break out of the generated Java or PHP documentation comment and execute in the consuming application or build environment once that generated source is compiled and loaded (Java) or loaded (PHP). The flaw is reachable unauthenticated (CVSS:3.1/AV:N/AC:L/PR:N/UI:R) but requires user interaction: a developer or CI pipeline must generate client code from an untrusted or tampered spec and then build or load the output, making this a build-time/supply-chain path rather than an attack on already-deployed runtime services. There is no public exploit identified at time of analysis and the CVE is not listed in CISA KEV; CVSS 3.1 base score is 8.8, and the issue is fixed in 1.35.0.

RemediationAI

Primary fix: upgrade Kiota and the Microsoft.OpenApi.Kiota / Microsoft.OpenApi.Kiota.Builder packages to 1.35.0 or later (release tag: https://github.com/microsoft/kiota/releases/tag/v1.35.0), which applies the delimiter-neutralization change from https://github.com/microsoft/kiota/pull/8017 and https://github.com/microsoft/kiota/commit/68f33b865be9273464a6efbbe17379760e51f1a4; the detailed vendor advisory is at https://github.com/microsoft/kiota/security/advisories/GHSA-rm89-rhwj-9j92. Until upgrading, the most effective compensating control is procedural rather than technical: treat every OpenAPI description as untrusted input and do not run the PHP or Java generation step against specs sourced outside your trust boundary, since only generation followed by compile/load of the emitted code triggers execution - the trade-off is that this blocks legitimate third-party or partner specs from being consumed at all. Additional steps you can take in the interim: pin the generator version in your build image and rebuild it only through a reviewed change, which prevents silent drift but requires active maintenance; scan or gate incoming specs for overlapping delimiter patterns such as '**//' and, in Java, non-ASCII characters adjacent to '/', recognizing that this is a best-effort filter and not a formal equivalent of the upstream fix; and review or diff generated Java/PHP source before compilation so a breakout is caught before it reaches the compiler, at the cost of added pipeline time. Note that already-deployed runtime services are not remediated by regeneration alone only in the sense that they are only at risk if they regenerate clients from hostile specs, so no runtime patch is required beyond upgrading the generator that produces future code.

Affected VersionsENISA

kiota 0.5.0, < 1.35.0
Microsoft.OpenApi.Kiota 0.5.0, < 1.35.0
Microsoft.OpenApi.Kiota.Builder 0.5.0, < 1.35.0

Affected Packages

nuget microsoft.openapi.kiota fix: 1.35.0
nuget microsoft.openapi.kiota.builder fix: 1.35.0
euvd kiota_0_5_0 fix: 1.35.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in nuget, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-94 (Improper Control of Generation of Code / Code Injection) in Kiota's documentation-comment sanitizers. Both the Java (JavaConventionService.WriteLongDescription) and PHP (PhpConventionService.RemoveInvalidDescriptionCharacters) writers previously applied Replace("*/", string.Empty) to schema-derived description text, deleting block-comment terminators instead of neutralizing them. Because deletion removes two characters, surrounding characters can rejoin to form a fresh '*/’ terminator - the fix's own test cases show '**//' collapsing to '*/' - which lets attacker-supplied OpenAPI text terminate the generated documentation comment and spill into executable code position in the emitted source file. The Java path has an additional compounding defect: nonAsciiReplaceRegex() strips non-ASCII characters after the terminator deletion, so an input such as '*é/' normalizes into a new '*/' even though no literal terminator was present. The upstream fix (PR #8017, commit 68f33b865be9273464a6efbbe17379760e51f1a4) introduces a shared StringExtensions.NeutralizeBlockCommentDelimiters helper that replaces rather than deletes delimiters ('/*' becomes '//*' and '*/' becomes '* /'), guaranteeing no residual terminator can re-form, and reorders the Java pipeline so non-ASCII stripping happens before delimiter neutralization. CPE data (‘microsoft:kiota’, ‘microsoft:microsoft.openapi.kiota’, ‘microsoft:microsoft.openapi.kiota.builder’) confirms the affected surface is the Kiota generator itself, distributed both as a CLI tool and as the Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder packages, not any generated runtime library.

Know when Kiota gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Malicious OpenAPI spec is remotely sourced (AV:N) and the breakout is deterministic (AC:L) with no attacker privileges (PR:N), but a developer must generate and build the output (UI:R), yielding full code execution (C/I/A:H).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Oct 06, 2026 - 16:03 EUVD
CVE Published
Oct 06, 2026 - 14:21 cve.org
HIGH 8.8

DescriptionCVE.org

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.

Technical POC Analysis

CWE-94 (Improper Control of Generation of Code / "Code Injection").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Microsoft Kiota versions 0.5.0 through pre-1.35.0 introduce a build-time code-injection risk for teams generating Java or PHP clients from untrusted OpenAPI descriptions, potentially allowing attacker-controlled code to execute in CI/CD pipelines or consuming applications. This could compromise build credentials, source code, and downstream software artifacts, making it a supply-chain concern for development and security leadership. No public exploit identified at time of analysis, and the vendor-released patch is 1.35.0.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 42% exploitable
Prevalence
Medium
Microsoft OpenAPI code generator, common in .NET/Graph tooling but build-time only
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Kiota

View all
CVE-2026-59865 CRITICAL
9.3 Jul 16

Command injection in Microsoft Kiota before 1.32.5 lets a malicious or compromised OpenAPI description dictate the insta

CVE-2026-59866 CRITICAL
9.3 Jul 16

Path traversal and code injection in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description write

CVE-2026-59864 CRITICAL
9.3 Jul 16

Path traversal in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description inject unvalidated `stat

CVE-2026-59859 HIGH
8.7 Jul 16

PHP code generation in Microsoft Kiota prior to 1.32.4 permits injection of arbitrary PHP code when the generator proces

CVE-2026-59860 HIGH
8.7 Jul 16

Code-generation injection in Microsoft Kiota's C# XML documentation-comment writer allows an attacker who controls or co

CVE-2026-59861 HIGH
7.5 Jul 16

Code injection in Microsoft Kiota Ruby code generator allows remote code execution through crafted OpenAPI specification

CVE-2026-59862 HIGH
7.5 Jul 16

Code injection in Microsoft Kiota's Python client generator (versions prior to 1.32.0) allows an attacker who controls a

CVE-2026-59867 HIGH
7.1 Jul 16

Build-time SSRF, remote file inclusion, and local file inclusion in Microsoft Kiota before 1.32.5 lets an attacker-contr

CVE-2026-41134 HIGH
7.3 Apr 22

Code injection in Microsoft Kiota versions prior to 1.31.1 allows attackers who control or tamper with OpenAPI descripti

CVE-2026-59863 HIGH
7.0 Jul 16

Arbitrary file write via path traversal in Microsoft Kiota (OpenAPI HTTP client/plugin code generator) before 1.32.5 all

CVE-2026-105795 LOW POC
3.1 Oct 06

Microsoft Kiota, the OpenAPI-based HTTP client code generator, fails to validate the x-ai-capabilities.response_semantic

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy