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

- Severity: Critical 9.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.35%, higher than 72% of CVEs (2026-12-01)
- Published: 2026-07-16T14:46:50.738Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-4vv7-jj25-4gh6
- Weaknesses: CWE-22, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- microsoft kiota: >= 1.30.0, < 1.31.1; < 1.29.1
- Microsoft.OpenApi.Kiota (NuGet): from 1.30.0 before 1.32.5; before 1.29.1
- Microsoft.OpenApi.Kiota.Builder (NuGet): from 1.30.0 before 1.32.5; before 1.29.1

## Every score

- GitHub_M: CVSS:4.0 9.3 Critical `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`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/microsoft/kiota/security/advisories/GHSA-4vv7-jj25-4gh6> (web)
- <https://github.com/microsoft/kiota/pull/7884> (web)
- <https://github.com/microsoft/kiota/commit/dc812dbbf88ef7edf53a890d36b2f9d1460e947d> (web)
- <https://github.com/microsoft/kiota/releases/tag/v1.32.5> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59866> (advisory)
- <https://github.com/microsoft/kiota> (package)

## Sources

- CVE List: [CVE-2026-59866](https://www.cve.org/CVERecord?id=CVE-2026-59866), CVE Terms of Use, modified 2026-08-17
- GitHub Advisory Database: [GHSA-4vv7-jj25-4gh6](https://github.com/advisories/GHSA-4vv7-jj25-4gh6), CC-BY-4.0, modified 2026-08-17
- NVD: [CVE-2026-59866](https://nvd.nist.gov/vuln/detail/CVE-2026-59866), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-59866 · Whole record: https://cve.day/CVE-2026-59866.json · Rebuilt by cve.day 2026-11-25T22:59:28.395Z
