Vulnerability · Published Jul 16, 2026 · Assigned by GitHub_M

CVE-2026-59866Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName

Critical 9.3

In plain English

A critical-severity path traversal in kiota from microsoft. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 73% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)9.3Critical
Exploit odds (30 days)1.4%top 27.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGetmicrosoft.openapi.kiota1.32.5GHSA-4vv7-jj25-4gh6
NuGetmicrosoft.openapi.kiota1.29.1GHSA-4vv7-jj25-4gh6
NuGetmicrosoft.openapi.kiota.builder1.32.5GHSA-4vv7-jj25-4gh6
NuGetmicrosoft.openapi.kiota.builder1.29.1GHSA-4vv7-jj25-4gh6

Affected products (as reported)

VendorProductVersions
microsoft kiota >= 1.30.0, < 1.31.1< 1.29.1

Weakness: CWE-22, CWE-94 · Vector: 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

References