CVE-2026-59864: Microsoft Kiota Path/URL Injection Into Generated Copilot Vulnerability

CRITICAL
Advisory Identifier: GHSA-4jwf-m4wg-8p66
CWE-829 CWE-22
Published
Advisory Summary

CVE-2026-59864 is a CRITICAL path/url injection into generated copilot vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Microsoft Kiota libraries in the NuGet ecosystem. The issue involves path/url injection into generated copilot plugin manifest via x-ai-* extensions. Remediation is available by upgrading affected packages to version 1.32.5, 1.29.1.

CVE-2026-59864 at a Glance

CVE Identifier CVE-2026-59864
GHSA Identifier GHSA-4jwf-m4wg-8p66
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Microsoft Kiota
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix CVE-2026-59864

To remediate this vulnerability, upgrade all affected Microsoft Kiota dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Microsoft.OpenApi.Kiota fixed: 1.32.5
Upgrade Microsoft.OpenApi.Kiota to 1.32.5
Microsoft.OpenApi.Kiota.Builder fixed: 1.32.5
Upgrade Microsoft.OpenApi.Kiota.Builder to 1.32.5
Microsoft.OpenApi.Kiota fixed: 1.29.1
Upgrade Microsoft.OpenApi.Kiota to 1.29.1
Microsoft.OpenApi.Kiota.Builder fixed: 1.29.1
Upgrade Microsoft.OpenApi.Kiota.Builder to 1.29.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Microsoft.OpenApi.Kiota

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-59864, inspect your project dependencies for Microsoft Kiota:

inspect dependencies for Microsoft.OpenApi.Kiota

Analyze the terminal output to locate any version of Microsoft Kiota in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.32.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In Microsoft Kiota, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `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. Confirmed on Kiota **1.32.4** (`KIOTA_CONFIG_PREVIEW=true`, the self-contained `linux-x64` release binary). ### Details Both 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: ``` # spec -> generated manifest (functions[].capabilities.response_semantics) x-ai-adaptive-card: {title: T, data_path: $.x, file: "../../../../../../etc/passwd"} -> static_template.file = "../../../../../../etc/passwd" (CWE-22) x-ai-capabilities.response_semantics.static_template: {file: "../../../../../../etc/passwd"} -> static_template.file = "../../../../../../etc/passwd" (CWE-22) ``` (`x-ai-adaptive-card.file` only reaches the manifest when `title` is set, so `GetResponseSemanticsFromAdaptiveCardExtension` fires; otherwise kiota writes its own template card instead.) ### Impact **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. ### Patches Fixed 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. ### Remediation Upgrade to Kiota **1.29.1, 1.32.5** or later and regenerate affected plugins.

CVE-2026-59864 Affected Microsoft Kiota Versions

4 component(s)
Fixed Versions:
1.32.51.29.1
Product / Package Ecosystem Affected Versions Fixed Version
Microsoft.OpenApi.Kiota
NuGet
≥ 1.30.0
< 1.32.5
1.32.5
Microsoft.OpenApi.Kiota.Builder
NuGet
≥ 1.30.0
< 1.32.5
1.32.5
Microsoft.OpenApi.Kiota
NuGet
< 1.29.1
1.29.1
Microsoft.OpenApi.Kiota.Builder
NuGet
< 1.29.1
1.29.1

References

Frequently Asked Questions

What is CVE-2026-59864?
CVE-2026-59864 is a security vulnerability in Microsoft Kiota involving Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Microsoft Kiota versions are affected?
Affected versions include releases prior to 1.32.5, 1.29.1 across affected packages: Microsoft.OpenApi.Kiota, Microsoft.OpenApi.Kiota.Builder.
What version fixes CVE-2026-59864?
Upgrading to 1.32.5, 1.29.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Microsoft.OpenApi.Kiota affected?
Yes, Microsoft.OpenApi.Kiota is affected in releases prior to 1.32.5, 1.29.1. Upgrade your dependency to 1.32.5, 1.29.1 or later.
Is Microsoft.OpenApi.Kiota.Builder affected?
Yes, Microsoft.OpenApi.Kiota.Builder is affected in releases prior to 1.32.5, 1.29.1. Upgrade your dependency to 1.32.5, 1.29.1 or later.
What CWE is associated with CVE-2026-59864?
CVE-2026-59864 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check NuGet dependencies for CVE-2026-59864?
Run the dependency tree command: 'inspect dependencies for Microsoft.OpenApi.Kiota'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4jwf-m4wg-8p66",
  "modified" : "2026-08-17T14:54:42Z",
  "published" : "2026-07-24T15:58:31Z",
  "aliases" : [ "CVE-2026-59864" ],
  "summary" : "Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.OpenApi.Kiota"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.30.0"
      }, {
        "fixed" : "1.32.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.OpenApi.Kiota.Builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.30.0"
      }, {
        "fixed" : "1.32.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.OpenApi.Kiota"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.29.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.OpenApi.Kiota.Builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.29.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/security/advisories/GHSA-4jwf-m4wg-8p66"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59864"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/pull/7892"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/commit/9a185994a4e549b7bba3cc2beffb9736aa902e79"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/microsoft/kiota"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/releases/tag/v1.32.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-829" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T15:58:31Z",
    "nvd_published_at" : "2026-07-16T16:19:15Z"
  }
}