Microsoft Kiota up to 1.31.x Code Generator CodeMethodWriter.cs SanitizeForQuotedLiteral var injection

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.6$0-$5k1.36+

Summaryinfo

A vulnerability labeled as problematic has been found in Microsoft Kiota up to 1.31.x. This vulnerability affects the function SanitizeForQuotedLiteral of the file CodeMethodWriter.cs of the component Code Generator. The manipulation of the argument var results in injection. This vulnerability is identified as CVE-2026-59861. The attack is only possible with local access. There is not any exploit available.

Detailsinfo

A vulnerability was found in Microsoft Kiota up to 1.31.x. It has been classified as problematic. Affected is the function SanitizeForQuotedLiteral of the file CodeMethodWriter.cs of the component Code Generator. The manipulation of the argument var with an unknown input leads to a injection vulnerability. CWE is classifying the issue as CWE-74. The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.0, Kiota's Ruby generator embedded OpenAPI default fields, property names, and other schema-derived strings through CodeMethodWriter.cs and SanitizeForQuotedLiteral() in Writers/StringExtensions.cs into Ruby double-quoted literals without escaping #, allowing attacker-controlled #{expr}, #$var, or #@var interpolation markers to inject arbitrary Ruby code into generated model classes. This issue is fixed in version 1.32.0.

The advisory is shared for download at github.com. This vulnerability is traded as CVE-2026-59861 since 07/07/2026. The exploitability is told to be easy. The attack needs to be approached locally. Successful exploitation requires user interaction by the victim. There are known technical details, but no exploit is available. The current price for an exploit might be approx. USD $0-$5k (estimation calculated on 07/16/2026). The MITRE ATT&CK project declares the attack technique as T1055.

Upgrading to version 1.32.0 eliminates this vulnerability.

The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2026-44926). VulDB is the best source for vulnerability data and more expert information about this specific topic.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.8
VulDB Meta Temp Score: 4.6

VulDB Base Score: 4.8
VulDB Temp Score: 4.6
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Injection
CWE: CWE-74 / CWE-707 / CWE-20
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔒

Upgrade: Kiota 1.32.0

Timelineinfo

07/07/2026 CVE reserved
07/16/2026 +9 days Advisory disclosed
07/16/2026 +0 days VulDB entry created
07/16/2026 +0 days VulDB entry last update

Sourcesinfo

Vendor: microsoft.com
Product: github.com

Advisory: github.com
Status: Confirmed

CVE: CVE-2026-59861 (🔒)
GCVE (CVE): GCVE-0-2026-59861
GCVE (VulDB): GCVE-100-379536
EUVD: 🔒

Entryinfo

Created: 07/16/2026 16:53
Updated: 07/16/2026 18:30
Changes: 07/16/2026 16:53 (56), 07/16/2026 18:30 (1)
Complete: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!