Kiota: Code injection via doc-comment delimiter re-formation
Summary
Kiota, an OpenAPI-based HTTP client code generator, does not fully neutralize block-comment terminators in its Java and PHP generators. Attacker-controlled text in an OpenAPI description can reform a comment terminator and place code outside a generated documentation comment. Exploitation requires a developer or build pipeline to generate code from the malicious description and then compile and load the Java output or load the PHP output.
Affected
- Kiota Java and PHP generators from 0.5.0 before 1.35.0
- NuGet packages Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder, versions >= 0.5.0 and < 1.35.0
- The advisory states the range is based on the Java defect and does not confirm that PHP generation existed in every release in that range.
Fixed in
- Fixed in version 1.35.0
- The advisory states 1.35.0 fixes both the Java and PHP variants.
- Unknown: whether the 1.29.x security-backport releases contain the fix. Verify this in the advisory before relying on a 1.29.x release.
Workaround
- No workaround documented by the vendor other than upgrading.
- Interim measure: review generated Java and PHP source before compiling, loading or deploying it, and restrict generation to trusted OpenAPI sources.
Exploitation
- No known in-the-wild exploitation.
- Not listed in CISA KEV. CISA SSVC: exploitation none, automatable no, total technical impact.
- No public proof of concept found.
Our recommendation
- Inventory .NET projects and build pipelines for Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder, including transitive references, and identify any Java or PHP generation.
- Upgrade to Kiota 1.35.0 or later and regenerate all affected clients.
- Until upgraded, review generated Java and PHP code and generate clients only from trusted OpenAPI specifications.
- Prioritise pipelines that consume third-party or partner OpenAPI specifications.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-rm89-rhwj-9j92 github.com
- Kiota release v1.35.0 github.com
- Fix commit 68f33b8 github.com
- Pull request #8017 github.com
- GitHub Advisory GHSA-rm89-rhwj-9j92 github.com
- OSV GHSA-rm89-rhwj-9j92 osv.dev
- Kiota releases github.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 22:16.
Original description (NVD)
Kiota is an OpenAPI based HTTP Client code generator. From 0.5.0 until 1.35.0, Kiota's Java and PHP documentation-comment sanitizers delete block-comment terminators rather than neutralizing them, allowing overlapping characters to reform a terminator and place attacker-controlled OpenAPI text outside a generated documentation comment. The Java sanitizer also removes non-ASCII characters after deleting terminators, which can create a new terminator during normalization. Exploitation requires a developer or build pipeline to generate source from the malicious description and then compile and load the Java output or load the PHP output, after which injected code executes in the consuming application or build environment context. The version range is based on the Java defect and does not assert that PHP generation existed in every affected release. This issue is fixed in version 1.35.0.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
