PT-2026-60478
CVE-2026-59859
·
Published
2026-07-16
·
Updated
2026-08-17
Description by
CVSS 4.0
8.7
HighMetricsAV:N/AC:L/AT:N/PR:N/UI:P/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
Name of the Vulnerable Software and Affected Versions
Kiota versions prior to 1.29.1
Kiota versions prior to 1.32.4
Description
The PHP generator in Kiota is subject to a code generation literal injection. The
SanitizeDoubleQuote() function in Writers/StringExtensions.cs fails to escape the $ character when embedding OpenAPI descriptions, default fields, property names, and other schema-derived strings into PHP double-quoted literals. This allows an attacker who controls an OpenAPI specification to use interpolation constructs such as ${...}, $var, or {$obj->prop} to inject arbitrary PHP code into the generated model and request-builder classes, which is then evaluated at runtime.Recommendations
Upgrade to version 1.29.1 or later.
Upgrade to version 1.32.4 or later.
Audit and sanitize OpenAPI specifications by removing or replacing strings containing the
$ character before code generation.
Implement mandatory code review of generated PHP files to identify double-quoted strings containing ${, $var, or {$ patterns.
Restrict the consumption of OpenAPI specifications to trusted internal sources.
Manually escape $ characters in double-quoted string literals within generated files by replacing $ with $. Found an issue in the description? Have something to add? Feel free to write us 👾