Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. Microsoft.OpenApi.Kiota.Builder
  4. ›
  5. CVE-2026-59859

CVE-2026-59859: Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator

July 24, 2026

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 →

Affected versions

All versions before 1.32.4

Fixed versions

  • 1.32.4

Solution

Upgrade to version 1.32.4 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

nuget/Microsoft.OpenApi.Kiota.Builder/CVE-2026-59859.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:10 +0000.