Skip to main content

Kiota CVE-2026-59866

| EUVDEUVD-2026-44936 CRITICAL
Path Traversal (CWE-22)
2026-07-16 GitHub_M GHSA-4vv7-jj25-4gh6
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker crafts malicious OpenAPI spec
  2. Delivery
    Embed traversal payload in x-ms-kiota-info
  3. Exploit
    Developer runs kiota generate without -c
  4. Execution
    Unsanitized names used as output path
  5. Persist
    Write source outside -o and inject declarations
  6. Impact
    Malicious code compiled into project

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

Requires a developer to run kiota generate WITHOUT the -c/--class-name option against an attacker-controlled or compromised OpenAPI description in which the x-ms-kiota-info extension supplies malicious clientClassName and/or clientNamespaceName values (path-separator or .. sequences for directory escape, or identifier-breaking characters for code injection). Exploitation is limited by these prerequisites: the victim must actively invoke the generator on an untrusted spec; specifying -c/--class-name (or an explicit namespace) overrides and defeats the attack; and only Kiota versions prior to 1.32.5 are vulnerable. Despite CVSS UI:N, real exploitation depends on the developer running the tool, so this is a developer-toolchain rather than a live remote-service vector.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) yields 9.3 Critical and models fully unauthenticated remote impact, but this understates the practical precondition: exploitation is not a remote hit against a running service - it requires a developer to run kiota generate against an attacker-supplied or compromised OpenAPI description, and specifically without -c/--class-name. That is effectively a developer-tooling/supply-chain vector with implicit user interaction, so the real-world urgency is lower than the raw 9.3 suggests. No EPSS score was provided, there is no KEV listing, and no POC was supplied, so all three exploitation-likelihood signals are either absent or negative. The primary risk (arbitrary file write outside -o plus code injection into generated source that a developer subsequently compiles) is credible and can escalate to code execution on the developer/build host, but it is gated on ingesting an untrusted API description. Note the CVSS UI:N appears inconsistent with the description's clear requirement that a user invoke the generator - verify against the GitHub advisory GHSA-4vv7-jj25-4gh6.

Exploit ScenarioDerived

An attacker publishes or tampers with an OpenAPI description hosted at a URL a developer consumes, embedding an x-ms-kiota-info extension whose clientNamespaceName contains ../../ traversal and whose clientClassName carries injected declaration text. When the developer runs kiota generate -o ./client without -c, Kiota writes generated source outside ./client and emits the attacker's text into class/namespace declarations, which is compiled into the project. No public exploit code has been identified at time of analysis, but the mechanism is straightforward given the disclosed patch.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 1.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 16, 2026

Path traversal and code injection in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description write generated source files outside the intended output directory and inject arbitrary text into class/namespace declarations. When a developer runs kiota generate without the -c/--class-name flag, Kiota consumes the clientClassName and clientNamespaceName values from the OpenAPI x-ms-kiota-info extension without identifier or path sanitization, using them both as code identifiers and as filesystem path components. There is no public exploit identified at time of analysis and no CISA KEV listing, though the fix (SanitizeClientClassName/SanitizeClientNamespaceName) is visible in the merged patch.

RemediationAI

Vendor-released patch: upgrade Kiota to 1.32.5 or later, which sanitizes clientClassName and clientNamespaceName from settings and the x-ms-kiota-info extension before using them in code or file paths (see release https://github.com/microsoft/kiota/releases/tag/v1.32.5 and advisory https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6). Until upgraded, always pass an explicit -c/--class-name (and an explicit namespace) when running kiota generate, which overrides the attacker-controllable extension values and neutralizes the vector - the trade-off is losing the spec-provided naming convenience. Additionally, only generate clients from OpenAPI descriptions you trust and control, review third-party specs for x-ms-kiota-info entries containing path separators or .. before generation, and run generation in a sandboxed/containerized working directory so any directory escape cannot reach sensitive host paths.

Affected VersionsENISA

kiota < 1.32.5

Affected Packages

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

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 is Microsoft's OpenAPI-based HTTP client code generator (CLI and library, cpe:2.3:a:microsoft:kiota) used chiefly in the .NET/Microsoft Graph tooling ecosystem to scaffold typed API clients. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory): the values of the vendor-specific x-ms-kiota-info OpenAPI extension (clientClassName, clientNamespaceName) flowed directly from LanguageInformation.Parse and configuration binding into both generated code identifiers and output path construction with no filtering. Because a namespace like A.B.C maps to nested output directories, unsanitized dots and slashes/.. sequences in these fields allow directory escape from the -o target, while unsanitized identifier characters allow injection of arbitrary text into emitted class/namespace declarations. The 1.32.5 patch adds regex-based sanitization stripping characters outside [a-zA-Z0-9_] (class names) and [a-zA-Z0-9._-] (namespaces), collapsing consecutive dots, and trimming invalid leading characters.

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 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.4 HIGH

Attacker-supplied spec is fetched over network (AV:N) but a developer must run the generator (UI:R); write outside -o escapes the tool's scope (S:C); impact is file-write and code injection (I:H), not disclosure (C:N).

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/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
None
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:46 cve.org
CRITICAL 9.3

DescriptionCVE.org

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.5, Kiota emitted x-ms-kiota-info clientClassName and clientNamespaceName values without identifier or path sanitization as both generated client class or namespace names and generated output path components when kiota generate ran without -c/--class-name, allowing an attacker-controlled or compromised OpenAPI description to write generated source outside the -o output directory and inject arbitrary text into generated class or namespace declarations. This issue is fixed in version 1.32.5 by GenerationConfiguration.SanitizeClientClassName and SanitizeClientNamespaceName.

Executive ViewAI

Why It Matters

Microsoft Kiota before version 1.32.5 contains a critical code injection vulnerability affecting all organizations using this SDK generation tool. Attackers can inject arbitrary code into generated client libraries through malicious OpenAPI specifications, potentially compromising the entire software supply chain and every application using the generated SDKs. This vulnerability demands immediate action to inventory Kiota usage and implement interim controls.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) enforce mandatory human code review of all Kiota-generated source files prior to production deployment; (2) restrict OpenAPI specification sources to vetted internal documents only; (3) implement static code scanning on generated code to detect anomalous patterns indicating injection; (4) suspend new Kiota-based SDK generation workflows until patched version is available; (5) conduct forensic analysis of all previously generated SDKs from affected Kiota versions to identify potential compromise.

Threat Intelligence Overview

EPSS Score
1.4%
Top 32% exploitable
Prevalence
Medium
developer CLI code generator, moderate adoption in .NET/Microsoft Graph tooling
Threat Intel
1
1 source
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL 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 CRITICAL
CISA KEV No
Public POC No
EPSS 1.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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