# CVE-2026-59859: Kiota: Code Generation Literal Injection in the PHP Generator

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/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.00%, higher than 63% of CVEs (2026-12-01)
- Published: 2026-07-16T14:40:27.319Z
- Modified: 2026-10-24T21:10:00.130Z
- Also known as: GHSA-jqwh-526h-c92j
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, 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.4, Kiota's PHP generator embedded OpenAPI description, default fields, property names, and other schema-derived strings into PHP double-quoted literals through SanitizeDoubleQuote() in Writers/StringExtensions.cs without escaping $, allowing attacker-controlled ${...}, $var, or {$obj->prop} interpolation constructs to inject arbitrary PHP code into generated model and request-builder classes. This issue is fixed in version 1.29.1 and 1.32.4.

(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.4; before 1.29.1
- Microsoft.OpenApi.Kiota.Builder (NuGet): from 1.30.0 before 1.32.4; before 1.29.1

## Every score

- GitHub_M: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/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:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/microsoft/kiota/security/advisories/GHSA-jqwh-526h-c92j> (web)
- <https://github.com/microsoft/kiota/pull/7863> (web)
- <https://github.com/microsoft/kiota/commit/5e2a211ac4261988fbdc72c3b268596ea8837b87> (web)
- <https://github.com/microsoft/kiota/releases/tag/v1.32.4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59859> (advisory)
- <https://github.com/microsoft/kiota> (package)

## Sources

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

---

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