Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious OpenAPI description
-
DeliveryDeveloper generates Kiota Java/PHP client
-
ExploitCrafted text re-forms comment terminator
-
ExecutionInjected code escapes doc comment
-
PersistCompile and load generated source
-
ImpactArbitrary 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 2
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
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.
Command injection in Microsoft Kiota before 1.32.5 lets a malicious or compromised OpenAPI description dictate the insta
Path traversal and code injection in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description write
Path traversal in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description inject unvalidated `stat
PHP code generation in Microsoft Kiota prior to 1.32.4 permits injection of arbitrary PHP code when the generator proces
Code-generation injection in Microsoft Kiota's C# XML documentation-comment writer allows an attacker who controls or co
Code injection in Microsoft Kiota Ruby code generator allows remote code execution through crafted OpenAPI specification
Code injection in Microsoft Kiota's Python client generator (versions prior to 1.32.0) allows an attacker who controls a
Build-time SSRF, remote file inclusion, and local file inclusion in Microsoft Kiota before 1.32.5 lets an attacker-contr
Code injection in Microsoft Kiota versions prior to 1.31.1 allows attackers who control or tamper with OpenAPI descripti
Arbitrary file write via path traversal in Microsoft Kiota (OpenAPI HTTP client/plugin code generator) before 1.32.5 all
Microsoft Kiota, the OpenAPI-based HTTP client code generator, fails to validate the x-ai-capabilities.response_semantic
EUVD-2026-93425
GHSA-rm89-rhwj-9j92
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB