The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41134

CVE-2026-41134: Kiota HTTP Client Code Injection Vulnerability

CVE-2026-41134 is a code injection flaw in Kiota OpenAPI HTTP Client code generator that allows attackers to inject malicious code during generation. This article covers technical details, affected versions, and mitigation steps.

Published: April 23, 2026

CVE-2026-41134 Overview

CVE-2026-41134 is a code-generation literal injection vulnerability affecting Kiota, Microsoft's OpenAPI-based HTTP Client code generator. Versions prior to 1.31.1 contain a flaw in multiple writer sinks that allows malicious values from an OpenAPI description to be emitted into generated source code without proper context-appropriate escaping. This vulnerability enables attackers to break out of string literals and inject additional code into generated clients.

The affected components include serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission routines. When developers generate HTTP clients from untrusted or compromised OpenAPI descriptions, the resulting code may contain attacker-controlled payloads that execute when the generated client is compiled and run.

Critical Impact

Attackers can inject arbitrary code into generated HTTP clients through malicious OpenAPI descriptions, potentially leading to supply chain compromise and arbitrary code execution in applications using the generated clients.

Affected Products

  • Microsoft Kiota versions prior to 1.31.1
  • Generated HTTP clients created with vulnerable Kiota versions
  • Applications consuming generated clients from untrusted OpenAPI sources

Discovery Timeline

  • 2026-04-22 - CVE CVE-2026-41134 published to NVD
  • 2026-04-22 - Last updated in NVD database

Technical Details for CVE-2026-41134

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code - Code Injection). The root issue lies in Kiota's code generation pipeline, which fails to properly escape or sanitize values extracted from OpenAPI specification documents before embedding them into the generated source code.

The vulnerability requires local access to the system where code generation occurs, and some user interaction is needed (processing an untrusted OpenAPI specification). However, once exploited, the impact is severe—an attacker gains the ability to inject arbitrary code that executes with the full privileges of the application using the generated client.

The attack scenario involves an attacker crafting a malicious OpenAPI specification containing specially constructed values in fields such as property names, enum values, default values, or path parameters. When Kiota processes this specification, these malicious values are written directly into the generated code as string literals or metadata without proper escaping, allowing the attacker to break out of the intended context and inject executable code.

Root Cause

The vulnerability stems from insufficient output encoding in Kiota's code generation writers. When values from the OpenAPI description are written to generated source files, the writer sinks do not apply context-appropriate escaping for the target programming language. This allows characters that have special meaning in the target language (such as quotes, backslashes, or statement terminators) to terminate string literals prematurely and introduce attacker-controlled code.

Attack Vector

The attack requires an attacker to supply a malicious OpenAPI description to the code generation process. This can occur when developers generate clients from untrusted third-party API specifications, when a normally trusted API description repository is compromised, or when an attacker can modify API specifications through man-in-the-middle attacks or supply chain compromise.

Once the malicious specification is processed by a vulnerable version of Kiota, the generated client code contains the injected payload. The malicious code executes when the generated client is compiled and the affected code paths are invoked at runtime.

The vulnerability mechanism involves values in OpenAPI descriptions being embedded without proper string literal escaping. An attacker can craft values that terminate string literals early, inject code statements, and continue the string literal to maintain syntactic validity. This injected code then becomes part of the application's execution flow when the generated client is used.

For complete technical details and exploitation scenarios, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-41134

Indicators of Compromise

  • Review generated client source code for unexpected string terminations or code patterns not matching the OpenAPI specification
  • Check for unusual characters or escape sequences in generated enum values, property names, or URL templates
  • Audit OpenAPI descriptions for suspicious values in metadata fields, particularly those containing quotes or language-specific syntax
  • Monitor build pipelines for generated clients exhibiting compilation errors or unexpected behavior

Detection Strategies

  • Implement static code analysis on generated clients to detect anomalous code patterns or unexpected statements
  • Compare generated code output against expected patterns for the input OpenAPI specification
  • Use integrity verification for OpenAPI descriptions before processing (checksums, signatures)
  • Deploy runtime application security testing to identify unusual execution paths in applications using generated clients

Monitoring Recommendations

  • Audit the provenance and integrity of all OpenAPI specifications used in code generation pipelines
  • Monitor code generation logs for warnings or errors that might indicate malformed input
  • Implement change detection on OpenAPI specifications to identify unauthorized modifications
  • Track Kiota version usage across development environments and flag versions prior to 1.31.1

How to Mitigate CVE-2026-41134

Immediate Actions Required

  • Upgrade Kiota to version 1.31.1 or later immediately across all development environments
  • Regenerate all existing HTTP clients that were created with vulnerable Kiota versions
  • Audit the source of all OpenAPI descriptions used in your organization and ensure they come from trusted, integrity-protected sources
  • Review recently generated clients for signs of code injection before deployment

Patch Information

Microsoft has released Kiota version 1.31.1 which addresses this vulnerability by implementing proper context-appropriate escaping for all values emitted from OpenAPI descriptions into generated code. After upgrading, developers should regenerate all existing clients to ensure previously generated vulnerable code is replaced with hardened output.

Additional details are available in the GitHub Security Advisory.

Workarounds

  • Only generate HTTP clients from trusted, integrity-protected API descriptions that have been verified for authenticity
  • Implement a review process for OpenAPI specifications before using them for code generation
  • Use cryptographic signatures or checksums to verify OpenAPI description integrity before processing
  • Isolate code generation environments and review generated output before integrating into production codebases
bash
# Upgrade Kiota to patched version
dotnet tool update -g Microsoft.OpenApi.Kiota --version 1.31.1

# Verify installed version
kiota --version

# Regenerate existing clients with patched version
kiota generate -d ./openapi.yaml -o ./GeneratedClient -l csharp

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechKiota

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • 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/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English