Severity by source
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
4DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
Command injection in Microsoft Kiota before 1.32.5 lets a malicious or compromised OpenAPI description dictate the insta
Path traversal in Microsoft Kiota before 1.32.5 lets an attacker-controlled OpenAPI description inject unvalidated `stat
We need to produce a JSON object. All fields are plain text strings. We must synthesize from all provided data. We have
We need to produce a comprehensive JSON analysis. The user asks for a senior vulnerability analyst synthesis across mult
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
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-44936
GHSA-4vv7-jj25-4gh6