CVE-2026-105796: Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators
An attacker who controls or tampers with an OpenAPI description can cause Kiota to emit attacker-controlled Java or PHP source outside a generated documentation comment. The affected sanitizers remove comment terminators rather than neutralizing them, allowing a terminator to reform from overlapping characters or from subsequent normalization. The Java sanitizer also removes non-ASCII characters after removing terminators, which can create a new terminator.
Exploitation requires a developer or build pipeline to generate a client from the malicious description and subsequently compile and load the Java output, or load the PHP output. Code executes in the consuming application’s or build environment’s security context, not merely because Kiota reads the description.
References
- github.com/advisories/GHSA-rm89-rhwj-9j92
- github.com/microsoft/kiota/commit/68f33b865be9273464a6efbbe17379760e51f1a4
- github.com/microsoft/kiota/pull/8017
- github.com/microsoft/kiota/releases/tag/v1.35.0
- github.com/microsoft/kiota/security/advisories/GHSA-rm89-rhwj-9j92
- nvd.nist.gov/vuln/detail/CVE-2026-105796
Code Behaviors & Features
Detect and mitigate CVE-2026-105796 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →