Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker crafts malicious OpenAPI spec
-
DeliveryEmbed traversal payload in x-ms-kiota-info
-
ExploitDeveloper runs kiota generate without -c
-
ExecutionUnsanitized names used as output path
-
PersistWrite source outside -o and inject declarations
-
ImpactMalicious 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 |
| 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 |
| Exploit ScenarioDerived | An attacker publishes or tampers with an OpenAPI description hosted at a URL a developer consumes, embedding an |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 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
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
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
2DescriptionCVE.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
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.
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
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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
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-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-44936
GHSA-4vv7-jj25-4gh6
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB