Executive brief
Microsoft Kiota is a tool used by developers to automatically generate API client code. A vulnerability in its PHP code generator allows an attacker to inject malicious code into the generated files by providing a specially crafted API specification. If a developer uses an untrusted specification to generate their client, the resulting code could allow an attacker to execute arbitrary commands on the server where the application is deployed.
Technical details
The vulnerability exists in the Kiota PHP generator's 'StringExtensions.cs' component, specifically within the 'SanitizeDoubleQuote()' function. The generator fails to escape the '