{"id":"CVE-2026-59866","published":"2026-07-16T14:46:50Z","modified":"2026-08-17T15:03:20Z","title":"Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName","vendor":"Microsoft","product":"kiota","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01413,"percentile":0.73379,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/microsoft/kiota/pull/7884","tags":["x_refsource_MISC"]},{"url":"https://github.com/microsoft/kiota/commit/dc812dbbf88ef7edf53a890d36b2f9d1460e947d","tags":["x_refsource_MISC"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.5","tags":["x_refsource_MISC"]}],"priority":{"score":21.2,"factors":[{"name":"EPSS percentile","points":14.68},{"name":"CVSS severity","points":6.51}]},"vendorSlug":"microsoft","affectedVersions":[{"vendor":"microsoft","product":"kiota","versions":[">= 1.30.0, < 1.31.1","< 1.29.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-17T03:56:40.596267Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","vulnerableRanges":[">=1.30.0, <1.32.5","<1.29.1"],"patched":["1.32.5","1.29.1"],"from":["GHSA-4vv7-jj25-4gh6"],"provenance":"source"},{"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","vulnerableRanges":[">=1.30.0, <1.32.5","<1.29.1"],"patched":["1.32.5","1.29.1"],"from":["GHSA-4vv7-jj25-4gh6"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-44936","exploited":false,"provenance":"source"}}