# CVE-2026-59862: Kiota: Code Generation Literal Injection in the Python Generator

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- 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.02%, higher than 64% of CVEs (2026-12-01)
- Published: 2026-07-16T14:38:59.471Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-7f3j-j7jj-r3vr
- Weaknesses: 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.0, Kiota's Python generator let attacker-controlled enum value descriptions from x-ms-enum.values[].description flow through KiotaBuilder.SetEnumOptions into Documentation.DescriptionTemplate and PythonConventionService.RemoveInvalidDescriptionCharacters without newline sanitization, allowing generated inline comments to split and execute attacker-controlled Python code at module scope when generated modules were imported. This issue is fixed in version 1.29.1 and 1.32.0.

(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.0; before 1.29.1
- Microsoft.OpenAPI.Kiota.Builder (NuGet): from 1.30.0 before 1.32.0; before 1.29.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/microsoft/kiota/security/advisories/GHSA-7f3j-j7jj-r3vr> (web)
- <https://github.com/microsoft/kiota/releases/tag/v1.32.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59862> (advisory)
- <https://github.com/microsoft/kiota> (package)

## Sources

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

---

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