CVE-2026-59864 — Vulnerability in Microsoft.OpenApi.Kiota
Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.33%). Schedule for your next planned update.
Does your project use an affected Microsoft.OpenApi.Kiota version?
Paste your packages.lock.json to check it for CVE-2026-59864 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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 (125 days ago).
- Last revised August 17, 2026 — 24 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Microsoft.OpenApi.Kiota --version 1.32.5
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.32.5
dotnet add package Microsoft.OpenApi.Kiota --version 1.29.1
dotnet add package Microsoft.OpenApi.Kiota.Builder --version 1.29.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (4)
Affects 1 ecosystem: NuGet (2).
| Package | Fixed In |
|---|---|
| Microsoft.OpenApi.Kiota NuGet · Affected: 1.30.0, 1.31.0, 1.31.1, 1.32.0 (+4 more) | 1.32.5 |
| Microsoft.OpenApi.Kiota.Builder NuGet · Affected: All versions | 1.32.5 |
| Microsoft.OpenApi.Kiota NuGet · Affected: 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 · Affected: 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.
- CWE-22Path TraversalMITRE
- CWE-829
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
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
References
- https://github.com/microsoft/kiota/security/advisories/GHSA-4jwf-m4wg-8p66WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-59864ADVISORY
- https://github.com/microsoft/kiota/pull/7892WEB
- https://github.com/microsoft/kiota/commit/9a185994a4e549b7bba3cc2beffb9736aa902e79WEB
- https://github.com/microsoft/kiotaPACKAGE
- https://github.com/microsoft/kiota/releases/tag/v1.32.5WEB
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. It has a 1.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-59864 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 71.2% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-59865CRITICAL
Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`
- CVE-2026-59860HIGH
Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection
- CVE-2026-59863HIGH
Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF
- CVE-2026-59866HIGH
Microsoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName
- CVE-2026-59862HIGH
Microsoft Kiota: Code Generation Literal Injection in Kiota Python Generator
- CVE-2026-59859HIGH
Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator
- CVE-2026-59867HIGH
Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
- CVE-2026-105796HIGH
Kiota: Code injection through doc-comment delimiter reformation in Kiota Java and PHP generators