Skip to main content

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

0
High
Published: 10/06/2026 (10/06/2026, 15:36:00 UTC)
Source: CVE Database V5
Vendor/Project: microsoft
Product: kiota

Description

### Impact An attacker who controls or tampers with an OpenAPI description can cause Kiota to emit attacker-controlled Java or PHP source outside a generated documentation comment. The affected sanitizers remove comment terminators rather than neutralizing them, allowing a terminator to reform from overlapping characters or from subsequent normalization. The Java sanitizer also removes non-ASCII characters after removing terminators, which can create a new terminator. Exploitation requires a developer or build pipeline to generate a client from the malicious description and subsequently compile and load the Java output, or load the PHP output. Code executes in the consuming application's or build environment's security context, not merely because Kiota reads the description. ### Affected versions The affected NuGet packages are `Microsoft.OpenApi.Kiota` and `Microsoft.OpenApi.Kiota.Builder`. The Java normalization-order defect was introduced in version 0.5.0 and remains present through version 1.34.1, including the separate 1.29.1 security-backport release. The PHP delimiter-reformation variant is also present in version 1.34.1 and 1.29.1. Version 1.35.0 fixes both variants. The package version range below reflects the Java defect; it does not assert that PHP generation existed in every version in that range. ### Patches Upgrade to Kiota 1.35.0 or later and regenerate affected clients. The fix neutralizes block-comment delimiters instead of deleting them, and performs Java delimiter neutralization after non-ASCII normalization. - Fix: https://github.com/microsoft/kiota/pull/8017 - Fixed release: https://github.com/microsoft/kiota/releases/tag/v1.35.0 ### Workarounds Until upgrading, generate clients only from trusted, integrity-protected OpenAPI descriptions. Review generated Java and PHP source before compiling, loading, or deploying it. Restrict the privileges and secrets available to generation and build environments. ### Related advisories This is distinct from PHP double-quoted string interpolation (GHSA-jqwh-526h-c92j) and C# XML documentation newline breakout (GHSA-3hrf-2gc2-mx32). Those fixes do not address Java/PHP block-comment delimiter reformation.

CVSS v3.1

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

microsoft

kiota

Affected versions
>=0.5.0 <1.35.0

microsoft

Microsoft.OpenApi.Kiota

Affected versions
>=0.5.0 <1.35.0

microsoft

Microsoft.OpenApi.Kiota.Builder

Affected versions
>=0.5.0 <1.35.0
GitHub Actionsmore threats →ai
microsoft/kiota
pkg:github/microsoft/kiota
Affected versions
>=0.5.0 <1.35.0

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: 10/06/2026, 14:48:26 UTC

Technical Analysis

Microsoft Kiota versions >=0.5.0 and <1.35.0 contain a CWE-94 improper control of code generation vulnerability. The sanitizers for Java and PHP documentation comments delete block-comment terminators instead of neutralizing them, enabling overlapping characters to reform terminators and place attacker-controlled OpenAPI text outside documentation comments. The Java sanitizer also removes non-ASCII characters after deleting terminators, potentially creating new terminators during normalization. Exploitation requires a developer or build pipeline to generate source code from a malicious OpenAPI description and then compile/load the output, resulting in code execution within the consuming application or build environment context. The vulnerability is resolved in version 1.35.0.

Potential Impact

Successful exploitation allows an attacker to inject and execute arbitrary code in the context of the consuming application or build environment, potentially leading to full compromise of the application or build pipeline. The CVSS v3.1 score is 8.8 (High), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade to Microsoft Kiota version 1.35.0 or later, where this vulnerability is fixed. No other mitigation is indicated or necessary once the fixed version is deployed.

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-10-05T20:37:19.364Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ac506e32cdf04f656b9a060

Added to database: 10/06/2026, 14:34:11 UTC

Last enriched: 10/06/2026, 14:48:26 UTC

Last updated: 10/06/2026, 21:42:14 UTC

Views: 17

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