Skip to main content
EPSS 0.4%top 64%

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

0
High
Published: 04/22/2026 (04/22/2026, 20:20:57 UTC)
Source: CVE Database V5
Vendor/Project: microsoft
Product: kiota

Description

Kiota is an OpenAPI based HTTP Client code generator. Versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks (for example: serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission). When malicious values from an OpenAPI description are emitted into generated source without context-appropriate escaping, an attacker can break out of string literals and inject additional code into generated clients. This issue is only practically exploitable when the OpenAPI description used for generation is from an untrusted source, or a normally trusted OpenAPI description has been compromised/tampered with. Only generating from trusted, integrity-protected API descriptions significantly reduces the risk. To remediate the issue, upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients as a precaution. Refreshing generated clients ensures previously generated vulnerable code is replaced with hardened output.

CVSS v4.0

Score 7.3high

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
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:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

microsoft

kiota

Affected versions
>=1.30.0 <1.31.1<1.29.1
GitHub Actionsmore threats →ai
microsoft/kiota
pkg:github/microsoft/kiota
Affected versions
<1.31.1

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: 08/17/2026, 16:23:43 UTC

Technical Analysis

Microsoft Kiota versions <1.29.1 and >=1.30.0 <1.31.1 suffer from a code generation literal injection vulnerability (CWE-94). When malicious input from an OpenAPI description is emitted into generated source code without context-appropriate escaping, attackers can break out of string literals and inject arbitrary code into generated clients. This affects multiple writer sinks such as serialization keys, path/query parameters, URL templates, enum/property metadata, and default values. Exploitation requires using an untrusted or compromised OpenAPI description. The issue is resolved by upgrading to Kiota 1.29.1, 1.31.1, or later and regenerating clients.

Potential Impact

If an attacker can supply or tamper with the OpenAPI description used for client generation, they can inject arbitrary code into the generated client source code. This can lead to execution of attacker-controlled code when the generated client is compiled and run. The risk is significantly reduced if only trusted and integrity-protected OpenAPI descriptions are used. There are no known exploits in the wild at this time.

Mitigation Recommendations

Upgrade Kiota to version 1.31.1 or later, which contains the fix for this vulnerability. Additionally, regenerate or refresh any previously generated clients using the updated Kiota version to replace vulnerable generated code. This ensures that all generated source code is hardened against this injection issue.

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-04-17T12:59:15.738Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69e9338e19fe3cd2cdedf9a4

Added to database: 04/22/2026, 20:46:06 UTC

Last enriched: 08/17/2026, 16:23:43 UTC

Last updated: 09/12/2026, 22:01:33 UTC

Views: 155

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