Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-59859: CWE-94: Improper Control of Generation of Code ('Code Injection') in microsoft kiota

0
High
VulnerabilityCVE-2026-59859cvecve-2026-59859cwe-94
Published: 07/16/2026 (07/16/2026, 14:40:27 UTC)
Source: CVE Database V5
Vendor/Project: microsoft
Product: kiota

Description

CVE-2026-59859 is a high-severity code injection vulnerability in Microsoft Kiota, an OpenAPI-based HTTP client code generator. Prior to version 1.32.4, the PHP generator improperly handled schema-derived strings by embedding them into double-quoted PHP literals without escaping the dollar sign ($). This allowed attacker-controlled interpolation constructs such as ${...}, $var, or {$obj->prop} to inject arbitrary PHP code into generated model and request-builder classes. The issue is fixed in version 1.32.4.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

GitHub Actionsmore threats →ai
microsoft/kiota
pkg:github/microsoft/kiota
Affected versions
<1.32.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 15:03:05 UTC

Technical Analysis

Microsoft Kiota versions before 1.32.4 contain a code injection vulnerability (CWE-94) in the PHP code generator. The vulnerability arises because the SanitizeDoubleQuote() function in Writers/StringExtensions.cs fails to escape the dollar sign ($) in OpenAPI schema-derived strings embedded into PHP double-quoted literals. This allows an attacker to inject arbitrary PHP code via specially crafted OpenAPI descriptions that include interpolation constructs. The vulnerability is resolved in Kiota version 1.32.4.

Potential Impact

An attacker who can supply or influence the OpenAPI description used by Kiota's PHP generator can inject arbitrary PHP code into generated classes. This can lead to remote code execution in environments where the generated code is used, posing a significant security risk.

Mitigation Recommendations

Upgrade to Kiota version 1.32.4 or later, where this vulnerability is fixed by properly escaping the dollar sign in PHP double-quoted literals. No other mitigation is indicated. Patch status is not explicitly confirmed in the advisory, but the fix is stated to be in version 1.32.4.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-07-07T15:41:53.606Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a58ef3568715ace43306131

Added to database: 07/16/2026, 14:48:21 UTC

Last enriched: 07/16/2026, 15:03:05 UTC

Last updated: 07/16/2026, 20:48:57 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses