Skip to main content

Microsoft Kiota CVE-2026-59859

| EUVDEUVD-2026-44928 HIGH
Code Injection (CWE-94)
2026-07-16 GitHub_M GHSA-jqwh-526h-c92j
8.7
CVSS 4.0 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
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/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
vuln.today AI
9.6 CRITICAL

Malicious spec delivered remotely (AV:N, PR:N), developer must run generator (UI:R), generated code executes in PHP runtime beyond Kiota's trust boundary (S:C), enabling full RCE (C:H/I:H/A:H).

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
X

Lifecycle Timeline

4
Patch available
Jul 16, 2026 - 17:03 EUVD
Source Code Evidence Fetched
Jul 16, 2026 - 15:03 vuln.today
Analysis Generated
Jul 16, 2026 - 15:03 vuln.today
CVE Published
Jul 16, 2026 - 14:40 cve.org
HIGH 8.7

DescriptionCVE.org

Kiota is an OpenAPI based HTTP Client code generator. Prior to 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.32.4.

AnalysisAI

PHP code generation in Microsoft Kiota prior to 1.32.4 permits injection of arbitrary PHP code when the generator processes attacker-controlled OpenAPI specification fields, because the shared SanitizeDoubleQuote() helper in Writers/StringExtensions.cs fails to escape the $ character before embedding schema-derived strings into PHP double-quoted literals. Developers or CI/CD pipelines that generate PHP API clients from untrusted or third-party specifications will produce PHP files containing live interpolation expressions (${...}, $var, {$obj->prop}) that execute attacker-chosen code at PHP runtime in production environments. No public exploit has been identified and SSVC rates exploitation as currently none, but technical impact is rated total; the realistic risk is tightly gated on whether teams consume external or attacker-influenced specs without generated-code review.

Technical ContextAI

Kiota is Microsoft's OpenAPI-based HTTP client code generator that produces typed API clients across multiple languages, distributed via NuGet as Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder. The vulnerability resides in the shared SanitizeDoubleQuote() function (CWE-94: Improper Control of Code Generation), which strips double-quote characters from OpenAPI schema-derived strings before embedding them into generated source code but never escapes the $ character. PHP's double-quoted string literals natively evaluate interpolation constructs - ${expression}, $variable, and {$object->property} - at runtime, meaning any schema field (description, default values, enum wire-names, discriminator property names, Accept header values, request body content types, query-parameter serialization names) that contains a $-prefixed construct is emitted verbatim into generated PHP model and request-builder classes. The fix, introduced in commit 5e2a211ac4261988fbdc72c3b268596ea8837b87 via PR #7863, adds PhpConventionService.SanitizePhpDoubleQuoteLiteral() which chains SanitizeDoubleQuote() with .Replace("$", "\\$"). This is a recurrence of a previously fixed literal-injection class: the Ruby generator had an analogous # interpolation fix, and the PHP $ variant was a missed sibling in the sanitizer helper.

RemediationAI

Upgrade Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder NuGet packages to version 1.32.4 or later; for projects pinned to the older branch, upgrade to 1.29.1. The patch is confirmed at https://github.com/microsoft/kiota/releases/tag/v1.32.4 and the fix commit is 5e2a211ac4261988fbdc72c3b268596ea8837b87. After upgrading, regenerate all PHP client code to replace previously generated files that may contain unescaped interpolation constructs. If immediate upgrade is not feasible, apply three compensating controls: first, audit all OpenAPI specification files consumed by the generator for $ characters in description fields, default values, property wire-names, enum values, and header values, removing or escaping suspicious strings before generation; second, implement mandatory code review of all generated PHP files, scanning double-quoted strings for ${, $varname, or {$ patterns before merging any branch; third, restrict code generation strictly to fully trusted, internally authored OpenAPI specifications and block automated regeneration from remote or third-party spec URLs. Each control degrades gracefully if bypassed, so layer all three when patching is delayed.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

Share

CVE-2026-59859 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy