{"id":"CVE-2026-59864","aliases":["CVE-2026-59864","GHSA-4jwf-m4wg-8p66"],"related":[],"kind":"vulnerability","state":"published","title":"Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions","summary":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota plugin add` and `kiota plugin generate` (with `-t APIPlugin`) emitted attacker-controlled static_template.file values from x-ai-adaptive-card and x-ai-capabilities into generated Microsoft 365 Copilot and Teams plugin manifests without path validation, allowing ../, absolute, rooted, UNC, Windows drive, or URI paths in response_semantics.static_template.file to cause path traversal or out-of-package file inclusion when the generated plugin was deployed. This issue is fixed in version 1.29.1 and 1.32.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota plugin add` and `kiota plugin generate` (with `-t APIPlugin`) emitted attacker-controlled static_template.file values from x-ai-adaptive-card and x-ai-capabilities into generated Microsoft 365 Copilot and Teams plugin manifests without path validation, allowing ../, absolute, rooted, UNC, Windows drive, or URI paths in response_semantics.static_template.file to cause path traversal or out-of-package file inclusion when the generated plugin was deployed. This issue is fixed in version 1.29.1 and 1.32.5.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`kiota plugin add` / `kiota plugin generate` (with `-t APIPlugin`) emits an attacker-controlled `static_template.file` path from the AI-plugin extensions (`x-ai-adaptive-card`, `x-ai-capabilities`) **verbatim**, with no path validation, into the generated Microsoft 365 Copilot / Teams plugin manifest (`<name>-apiplugin.json`). An attacker-controlled or compromised OpenAPI description can therefore embed a `../` / absolute path into the manifest's `response_semantics.static_template.file`, yielding a **path traversal (CWE-22)** / out-of-package file inclusion (CWE-829) that is resolved by the AI host when the generated plugin is deployed.\n\nConfirmed on Kiota **1.32.4** (`KIOTA_CONFIG_PREVIEW=true`, the self-contained `linux-x64` release binary).\n\n### Details\n\nBoth extension paths write the `static_template.file` reference straight into the manifest without sanitization — `PluginsGenerationService.GetResponseSemanticsFromAdaptiveCardExtension` mints `static_template = {\"file\": <File>}`, and the `x-ai-capabilities` path copies the `static_template` object through:\n\n```\n# spec                                                  -> generated manifest (functions[].capabilities.response_semantics)\nx-ai-adaptive-card: {title: T, data_path: $.x,\n   file: \"../../../../../../etc/passwd\"}                -> static_template.file = \"../../../../../../etc/passwd\"   (CWE-22)\nx-ai-capabilities.response_semantics.static_template:\n   {file: \"../../../../../../etc/passwd\"}               -> static_template.file = \"../../../../../../etc/passwd\"   (CWE-22)\n```\n\n(`x-ai-adaptive-card.file` only reaches the manifest when `title` is set, so `GetResponseSemanticsFromAdaptiveCardExtension` fires; otherwise kiota writes its own template card instead.)\n\n### Impact\n\n**This is not local code execution on the build host.** The injected path is written into the generated plugin manifest and realized **downstream**, when the plugin is packaged and sideloaded / deployed to an AI host (Microsoft 365 Copilot / Teams) that resolves `static_template.file` relative to the plugin package (out-of-package file reference via `../`). Kiota is the propagation point: it fails to reject `../` and absolute paths in this provider-supplied field before writing it into the manifest.\n\n### Patches\n\nFixed in **1.29.1 and 1.32.5** (https://github.com/microsoft/kiota/pull/7892). `static_template.file` from both `x-ai-adaptive-card` and `x-ai-capabilities` is validated as a relative path confined to the plugin output package: absolute URIs, rooted/UNC paths, Windows drive paths, and `..` traversal segments are rejected, and unsafe references are dropped with a warning. Regression tests cover `..`, absolute paths, and URI values.\n\n### Remediation\n\nUpgrade to Kiota **1.29.1, 1.32.5** or later and regenerate affected plugins.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Kiota es un generador de código de cliente HTTP basado en OpenAPI. Antes de la versión 1.32.5, “kiota plugin add” y “kiota plugin generate” (con “-t APIPlugin”) emitían valores de static_template.file controlados por el atacante desde x-ai-adaptive-card y x-ai-capabilities en los manifiestos de plugin generados de Microsoft 365 Copilot y Teams sin validación de ruta, permitiendo que rutas .. / , absolutas, raíz, UNC, de unidad de Windows o URI en response_semantics.static_template.file causaran salto de ruta o inclusión de ficheros fuera del paquete cuando el plugin generado era desplegado. Este problema está solucionado en la versión 1.32.5.","source":"nvd"}],"published":"2026-07-16T14:45:36.247Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"}],"cwes":["CWE-22","CWE-829"],"affected":[{"ranges":[{"version":">= 1.30.0, < 1.31.1","status":"affected"},{"version":"< 1.29.1","status":"affected"}],"vendor":"microsoft","product":"kiota","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.30.0","status":"affected","fixed":"1.32.5"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.30.0","status":"affected","fixed":"1.32.5"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.29.1"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.29.1"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","source":"ghsa"}],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-4jwf-m4wg-8p66","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/pull/7892","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/commit/9a185994a4e549b7bba3cc2beffb9736aa902e79","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59864","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/microsoft/kiota","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-07-16T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-59864","url":"https://www.cve.org/CVERecord?id=CVE-2026-59864","licence":"CVE Terms of Use","modified":"2026-08-17T15:02:52.269Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4jwf-m4wg-8p66","url":"https://github.com/advisories/GHSA-4jwf-m4wg-8p66","licence":"CC-BY-4.0","modified":"2026-08-17T15:00:08.105Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-59864","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59864","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.394Z","epss":{"score":0.01276,"percentile":0.70778,"date":"2026-12-01T12:00:22.000Z"}}