CVE-2026-59859: Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator
The Kiota PHP code generator is vulnerable to a code generation literal injection attack. The generator embeds string values from OpenAPI fields (e.g. description, default values, and property names) directly into PHP double-quoted string literals without properly escaping the $ character. Since PHP evaluates string interpolation expressions like "${expr}", "$var", and "{$obj->prop}" within double-quoted strings at runtime, an attacker who controls an OpenAPI specification file can inject arbitrary PHP code into generated model and request-builder classes.
References
- github.com/advisories/GHSA-jqwh-526h-c92j
- github.com/microsoft/kiota/commit/5e2a211ac4261988fbdc72c3b268596ea8837b87
- github.com/microsoft/kiota/pull/7863
- github.com/microsoft/kiota/releases/tag/v1.32.4
- github.com/microsoft/kiota/security/advisories/GHSA-jqwh-526h-c92j
- nvd.nist.gov/vuln/detail/CVE-2026-59859
Code Behaviors & Features
Detect and mitigate CVE-2026-59859 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →