Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker embeds newline payload in OpenAPI spec
-
DeliveryDeveloper or CI pipeline fetches malicious spec
-
ExploitKiota generates C# client with injected namespace-level code
-
ExecutionDeveloper compiles generated project
-
ImpactInjected code executes on developer or CI host
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 the OpenAPI description processed by Kiota originates from an untrusted or compromised source and contains at least one C line-terminator character (U+000A LF, U+000D CR, U+0085 NEXT LINE, U+2028 LINE SEPARATOR, or U+2029 PARAGRAPH SEPARATOR) embedded in the description, externalDocs.label, or externalDocs.url fields. The developer or CI pipeline must then (1) run Kiota code generation against the tainted spec and (2) compile the generated Cclient without auditing the output for unexpected code. Exploitation is not possible when generation is restricted exclusively to internal OpenAPI descriptions protected by cryptographic integrity controls. The CVSS 4.0 UI:P metric confirms that user-initiated build steps are a hard prerequisite. No authentication on any remote system is required since the attacker payload is embedded in the OpenAPI spec itself, which travels through normal developer workflow channels. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H) reflects low complexity once an attacker has introduced a malicious OpenAPI spec, but passive user interaction remains a hard prerequisite - the developer must both run generation and build the output. EPSS at 1.02% (59th percentile) is modest, and the absence of a CISA KEV listing indicates no confirmed widespread active exploitation. SSVC counters this with Exploitation: poc and Technical Impact: total, meaning a working demonstration exists and successful exploitation achieves full code execution in the developer or CI environment. The most significant real-world limiting factor is that exploitation is entirely gated on the victim processing a compromised or untrusted OpenAPI description: organizations generating only from internal, integrity-protected specs face negligible exposure. However, the supply-chain attack surface is meaningful - public API marketplaces, open-source project specs, and third-party vendor descriptions are routine inputs for Kiota users, and even a mid-sized municipal IT team in boleslawiec generating API clients from external specs should treat this as an urgent upgrade given the total code-execution impact in their build pipeline. The vendor-assigned AC:L is arguably optimistic since the attacker must first place a malicious spec in the victim's generation workflow, but is defensible because once that condition is met the injection itself requires no additional complexity. |
| Exploit ScenarioDerived | An attacker publishes a malicious public OpenAPI specification - or tampers with a trusted one in transit or in a repository - embedding a line-break followed by a C class with a static constructor calling System.Diagnostics.Process.Start pointing to attacker-controlled malware, as demonstrated in the GHSA advisory example. A developer or CI pipeline running Kiota generation against this spec produces a Cclient file where the payload appears after a broken-out /// comment as compilable namespace-level code; the next dotnet build or CI run executes the injected constructor, achieving code execution in the build environment. A POC is confirmed by SSVC and illustrated in the vendor advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
Code-generation injection in Microsoft Kiota's C
XML documentation-comment writer allows an attacker who controls or compromises an OpenAPI specification to inject arbitrary C
statements into generated client source files. Affected packages Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder in versions prior to 1.29.1 and in the 1.30.0-1.32.2 range fail to strip C
line-terminator characters from description and externalDocs fields before emitting them as single-line /// doc comments, enabling payload breakout into compilable namespace-level code. No public exploit confirmed in the wild at time of analysis, though SSVC reports a POC exists and rates technical impact as total; exploitation culminates when a developer or CI pipeline builds the tainted generated output.
RemediationAI
Upgrade both Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder to version 1.32.3 or later (or to 1.29.1 on the 1.29.x branch), as documented in the vendor advisory GHSA-3hrf-2gc2-mx32 at https://github.com/microsoft/kiota/security/advisories/GHSA-3hrf-2gc2-mx32 and the release at https://github.com/microsoft/kiota/releases/tag/v1.32.3. After upgrading, regenerate all existing generated clients to replace any previously produced code that may contain injected payloads, since the fix in PR #7831 ensures all future generation output will have line-terminators stripped before doc-comment emission. As a compensating control for teams that cannot immediately upgrade, restrict Kiota invocations to OpenAPI descriptions from sources with verified integrity (e.g., cryptographic hash pinning or signed artifacts) and add a code-review or static-analysis gate on generated output to detect unexpected class or method definitions outside /// comment blocks - note this manual review step does not scale well in automated pipelines and upgrade remains the preferred path.
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
Kiota (CPE: cpe:2.3:a:microsoft:kiota:*:*:*:*:*:*:*:*) is Microsoft's OpenAPI-driven HTTP client code generator, distributed as NuGet packages. When generating C
clients it writes metadata from OpenAPI description, externalDocs.label, and externalDocs.url fields into single-line XML documentation comments of the form /// …. The root cause, CWE-94 (Improper Control of Generation of Code), is that the CSharpConventionService writer did not strip or normalize the full set of C
line-terminator characters recognized by the C
ECMA-334 specification: CR (\r), LF (\n), U+0085 NEXT LINE, U+2028 LINE SEPARATOR, and U+2029 PARAGRAPH SEPARATOR. Any of these terminates the /// comment in the emitted source, causing attacker-supplied text after the terminator to appear as raw, compilable C
at namespace or class scope. The fix in PR #7831 (commit ebb632db90aa8e3c20949337d9faa2720d64ca44) adds a RemoveInvalidDescriptionCharacters helper applied to description and both externalDocs fields before any text is written into doc-comment output, covering all five line-terminator variants.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AV:N for network-distributed spec; AC:H because exploitation requires victim to process a compromised or untrusted OpenAPI description; UI:R for mandatory generation and build steps; no scope change since execution occurs in the developer's own environment.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.3, Kiota is affected by a code-generation injection vulnerability in the C
XML documentation-comment sink (the description, externalDocs label, and externalDocs link fields emitted as /// … comments). When text from an OpenAPI description is written into single-line XML doc comments without stripping newline and Unicode line-terminator characters, an attacker can break out of the /// comment line and inject additional code into generated C
clients. This issue is fixed in version 1.32.3.
Executive ViewAI
Microsoft Kiota code-generation tool (versions before 1.29.1 and 1.30.0-1.32.2) contains a code-injection vulnerability allowing attackers who control OpenAPI specifications to inject malicious C
code into generated client libraries; publicly available exploit code exists. Organizations using Kiota to generate client libraries from third-party or untrusted API specifications risk deploying compromised code into production, creating a critical supply-chain vulnerability across their software applications.
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
Code injection in Microsoft Kiota 0.5.0 through pre-1.35.0 allows attacker-controlled text embedded in an OpenAPI descri
PHP code generation in Microsoft Kiota prior to 1.32.4 permits injection of arbitrary PHP code when the generator proces
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-44931
GHSA-3hrf-2gc2-mx32
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB