{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-59866","id":"CVE-2026-59866","title":"Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName","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 descript","descriptionLong":"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.","published":"2026-07-16T14:46:50.738Z","updated":"2026-11-07T02:48:39.661982981Z","reserved":"2026-07-07T15:41:53.607Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":9.3,"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","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"4.0","score":9.3,"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","rating":"critical","source":"GitHub_M"},{"version":"4.0","score":9.3,"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/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","rating":"critical","source":"github.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"high","source":"GitHub"}],"rating":"critical","products":["microsoft kiota"],"affectedProducts":[{"vendor":"microsoft","product":"kiota","defaultStatus":null,"versions":[{"version":">= 1.30.0, < 1.31.1","status":"affected"},{"version":"< 1.29.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","ranges":[">=1.30.0 <1.32.5","<1.29.1"],"fixed":["1.32.5","1.29.1"],"advisory":"GHSA-4vv7-jj25-4gh6"},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","ranges":[">=1.30.0 <1.32.5","<1.29.1"],"fixed":["1.32.5","1.29.1"],"advisory":"GHSA-4vv7-jj25-4gh6"}],"cwes":["CWE-22","CWE-94"],"aliases":["GHSA-4vv7-jj25-4gh6"],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/microsoft/kiota/pull/7884","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/microsoft/kiota/commit/dc812dbbf88ef7edf53a890d36b2f9d1460e947d","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.5","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59866.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59866","tags":["advisory"]},{"url":"https://github.com/microsoft/kiota","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.01413,"epssPercentile":0.73294,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-59866","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59866","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-59866","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-4vv7-jj25-4gh6","ok":true,"note":"GHSA-4vv7-jj25-4gh6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-59866","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}