CVE-2026-59864: Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions

Published Jul 16, 2026
·
Updated

Summary

kiota plugin add / kiota plugin generate (with -t APIPlugin) emits an attacker-controlled statictemplate.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 responsesemantics.statictemplate.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 (KIOTACONFIGPREVIEW=true, the self-contained linux-x64 release binary).

Details

Both extension paths write the statictemplate.file reference straight into the manifest without sanitization — PluginsGenerationService.GetResponseSemanticsFromAdaptiveCardExtension mints statictemplate = {"file": <File>}, and the x-ai-capabilities path copies the statictemplate object through:

spec -> generated manifest (functions[].capabilities.responsesemantics) x-ai-adaptive-card: {title: T, datapath: $.x, file: "../../../../../../etc/passwd"} -> statictemplate.file = "../../../../../../etc/passwd" (CWE-22) x-ai-capabilities.responsesemantics.statictemplate: {file: "../../../../../../etc/passwd"} -> statictemplate.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 statictemplate.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.32.5 (https://github.com/microsoft/kiota/pull/7892). statictemplate.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.32.5 or later and regenerate affected plugins.

Other sources

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 statictemplate.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 responsesemantics.statictemplate.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.

NVD

Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.5, kiota plugin add and kiota plugin generate (with -t APIPlugin) emitted attacker-controlled statictemplate.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 responsesemantics.statictemplate.file to cause path traversal or out-of-package file inclusion when the generated plugin was deployed. This issue is fixed in version 1.32.5.

MITRE

Affected Software

3 affected componentsFixes available
Kiota Kiota<1.32.5
nuget/Microsoft.OpenApi.Kiota.Builder<1.32.5
1.32.5
nuget/Microsoft.OpenApi.Kiota<1.32.5
1.32.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/Microsoft.OpenApi.Kiota.Builder to a version that resolves this vulnerability.

    Fixed in 1.32.5
  2. Upgrade

    Upgrade nuget/Microsoft.OpenApi.Kiota to a version that resolves this vulnerability.

    Fixed in 1.32.5
  3. Upgrade

    Upgrade kiota to a version that resolves this vulnerability.

    Fixed in 1.32.5
  4. Operational

    After upgrading Kiota to 1.32.5 or later, re-run `kiota plugin add` / `kiota plugin generate` (with `-t APIPlugin`) to regenerate affected Microsoft 365 Copilot / Teams plugin manifests (`<name>-apiplugin.json`) so `response_semantics.static_template.file` is no longer emitted with unsanitized `x-ai-adaptive-card` / `x-ai-capabilities` path values.

Event History

Jul 16, 2026
CVE Published
via MITRE·02:45 PM
Data Sourced
via MITRE·02:45 PM
DescriptionWeakness
Data Sourced
via NVD·04:19 PM
DescriptionSeverityWeakness
Jul 24, 2026
Advisory Published
via GitHub·03:58 PM
Data Sourced
via GitHub·03:58 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59864?

CVE-2026-59864 has a severity rating of critical with a CVSS score of 9.3.

2

What is the risk associated with CVE-2026-59864?

The risk associated with CVE-2026-59864 is rated as 84, indicating a high level of threat.

3

How do I fix CVE-2026-59864?

To fix CVE-2026-59864, update Kiota to version 1.32.5 or later.

4

What does CVE-2026-59864 exploit?

CVE-2026-59864 exploits path/URL injection vulnerabilities in the generated Copilot plugin manifest.

5

Who is affected by CVE-2026-59864?

Users and developers utilizing versions of Kiota prior to 1.32.5 are affected by CVE-2026-59864.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203