Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 1.4%top 31%

CVE-2026-59866: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in microsoft kiota

0
Critical
Published: 07/16/2026 (07/16/2026, 14:46:50 UTC)
Source: CVE Database V5
Vendor/Project: microsoft
Product: kiota

Description

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 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.29.1 and 1.32.5 by GenerationConfiguration.SanitizeClientClassName and SanitizeClientNamespaceName.

CVSS v4.0

Score 9.3critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

GitHub Actionsmore threats →ai
microsoft/kiota
pkg:github/microsoft/kiota
Affected versions
<1.32.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/17/2026, 16:23:59 UTC

Technical Analysis

Microsoft Kiota improperly limits pathnames to a restricted directory (CWE-22) and allows code injection into generated client declarations (CWE-94) by emitting the clientClassName and clientNamespaceName values from the x-ms-kiota-info OpenAPI extension raw and unsanitized. When generating clients without specifying a class name, an attacker controlling the OpenAPI description can cause the generation process to write files outside the designated output directory and inject arbitrary text into class or namespace declarations. This was confirmed in Kiota 1.32.4. The vulnerability does not enable remote code execution because injected code breaks the build, but it can cause integrity issues and denial of service. The issue is fixed in versions 1.29.1 and 1.32.5 by sanitizing these values to remove unsafe characters and path separators.

Potential Impact

An attacker who controls or tampers with the OpenAPI description used by Kiota to generate client code can cause files to be written outside the intended output directory, potentially overwriting arbitrary files. Additionally, they can inject arbitrary text into the generated client code, corrupting the build process and causing denial of service. However, this vulnerability does not allow remote code execution because the injected code breaks compilation. The primary impact is integrity compromise and denial of service during client generation.

Mitigation Recommendations

Upgrade Microsoft Kiota to version 1.29.1, 1.32.5, or later. These versions include fixes that sanitize the clientClassName and clientNamespaceName values sourced from the x-ms-kiota-info extension, removing unsafe characters and path separators to prevent path traversal and code injection. Regenerate any affected clients after upgrading. No other mitigation is required as the issue is addressed by these official fixes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-07-07T15:41:53.607Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a58f9c068715ace434105f4

Added to database: 07/16/2026, 15:33:20 UTC

Last enriched: 08/17/2026, 16:23:59 UTC

Last updated: 08/29/2026, 22:52:12 UTC

Views: 86

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses