CVE-2026-59859 Details
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.
A code injection vulnerability has been identified in the Microsoft Kiota OpenAPI-based HTTP client code generator for PHP, affecting versions prior to 1.32.4. The issue arises because the generator embeds OpenAPI-derived string values into PHP double-quoted literals without properly escaping the '$' character. This oversight allows for the injection of arbitrary PHP code through interpolation constructs, such as '${...}', '$var', or '{$obj->prop}', into the generated model and request-builder classes.
Users can upgrade to Kiota version 1.32.4 or later to address this vulnerability. After upgrading, it is recommended to regenerate any previously generated PHP clients to ensure the injected code is removed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 16, 2026CISA-ADP
Assessed Jul 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/microsoft/kiota/commit/5e2a211ac4261988fbdc72c3b268596ea8837b87 | [email protected] | Source CodeVendor |
| https://github.com/microsoft/kiota/pull/7863 | [email protected] | Issue TrackingVendor |
| https://github.com/microsoft/kiota/releases/tag/v1.32.4 | [email protected] | Release NotesVendor |
| https://github.com/microsoft/kiota/security/advisories/GHSA-jqwh-526h-c92j | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Microsoft Kiota | < 1.32.4 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 24, 2026 | CVE Translated | [email protected] |
| Aug 17, 2026 | CVE Modified | [email protected] |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 17, 2026 | CVE Modified | CISA-ADP |
| Jul 16, 2026 | New CVE Received | [email protected] |
Volerion