Skip to main content

Microsoft Kiota CVE-2026-59860

| EUVDEUVD-2026-44931 HIGH
Code Injection (CWE-94)
2026-07-16 GitHub_M GHSA-3hrf-2gc2-mx32
8.7
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker embeds newline payload in OpenAPI spec
  2. Delivery
    Developer or CI pipeline fetches malicious spec
  3. Exploit
    Kiota generates C# client with injected namespace-level code
  4. Execution
    Developer compiles generated project
  5. Impact
    Injected 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 C

client 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 C

client 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.

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

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

Alert me

AnalysisAIv1 – 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

kiota < 1.32.3

Affected Packages

nuget microsoft.openapi.kiota fix: 1.29.1, 1.32.3
nuget microsoft.openapi.kiota.builder fix: 1.29.1, 1.32.3
euvd kiota fix: 1.32.3

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

Vendor (GitHub_M) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/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
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jul 16, 2026 - 17:03 EUVD
CVE Published
Jul 16, 2026 - 14:34 cve.org
HIGH 8.7

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
1.0%
Top 41% exploitable
Prevalence
Medium
Microsoft-backed OpenAPI client generator, significant .NET ecosystem adoption
Threat Intel
1
1 sources
Data Quality
7 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 1.0%
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
Poc
System Exposure· derived
Open
Automatable
Yes
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-105796 HIGH
8.8 Oct 06

Code injection in Microsoft Kiota 0.5.0 through pre-1.35.0 allows attacker-controlled text embedded in an OpenAPI descri

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-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