Loading...
Skip to main content

CVE-2026-59864 — Vulnerability in Microsoft.OpenApi.Kiota — CVE...

CRITICAL

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

Published July 24, 2026Updated August 17, 2026Source: osv

Summary

### 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.

Advisory Timeline

  • First published July 24, 2026 (80 days ago).
  • Last revised August 17, 2026 — 24 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Microsoft.OpenApi.Kiota to 1.32.5 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.32.5
NuGet
Update Microsoft.OpenApi.Kiota.Builder to 1.32.5 or later
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.32.5
NuGet
Update Microsoft.OpenApi.Kiota to 1.29.1 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.29.1
NuGet
Update Microsoft.OpenApi.Kiota.Builder to 1.29.1 or later
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.29.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 1 ecosystem: nuget (2).

PackageEcosystemAffectedFixed In
Microsoft.OpenApi.Kiota
nuget
1.30.0, 1.31.0, 1.31.1, 1.32.0 (+4 more)1.32.5
Microsoft.OpenApi.Kiota.Builder
nuget
All versions1.32.5
Microsoft.OpenApi.Kiota
nuget
0.1.0-preview, 0.1.1-preview, 0.1.2-preview, 0.1.3-preview (+62 more)1.29.1
Microsoft.OpenApi.Kiota.Builder
nuget
0.2.0-preview, 0.3.0-preview, 0.4.0-preview, 0.5.0-preview (+42 more)1.29.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-59864?
Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-59864?
CVE-2026-59864 affects Microsoft.OpenApi.Kiota and Microsoft.OpenApi.Kiota.Builder. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-59864 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-4jwf-m4wg-8p66

Related CVEs

  • CVE-2026-59865
    CRITICAL

    Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`

  • CVE-2026-59860
    HIGH

    Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection

  • CVE-2026-59863
    HIGH

    Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF

  • CVE-2026-59866
    HIGH

    Microsoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName

  • CVE-2026-59862
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota Python Generator

  • CVE-2026-59859
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator

  • CVE-2026-59867
    HIGH

    Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref

  • CVE-2026-105796
    HIGH

    Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies