CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-59864

CVE-2026-59864: Critical Out-of-Package Local File Inclusion in Microsoft Kiota

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 24, 2026·7 min read·61 visits

Executive Summary (TL;DR)

A critical path traversal vulnerability in Microsoft Kiota allows arbitrary out-of-package local file inclusion (LFI) in downstream hosts (e.g., Copilot, Teams) when processing malformed OpenAPI specifications.

CVE-2026-59864 is a critical path traversal vulnerability in Microsoft Kiota occurring when custom OpenAPI extensions specify a nested static template file. Lack of input sanitization allows malicious inputs to write directory traversal sequences directly into plugin manifests, causing out-of-package local file disclosure in downstream environments like Microsoft 365 Copilot.

Vulnerability Overview

Microsoft Kiota is an OpenAPI-based HTTP client and plugin code generator designed to streamline the integration of external APIs into application ecosystems, including Microsoft 365 Copilot and Microsoft Teams plugins. During the compilation of plugins via commands such as kiota plugin add or kiota plugin generate with the target parameter set to APIPlugin, Kiota parses incoming OpenAPI description documents to extract endpoints, capabilities, and presentation layers. This process exposes an attack surface centered on the parser's ingestion of custom OpenAPI extensions supplied by the document designer.

The vulnerability, tracked as CVE-2026-59864, is classified as an improper limitation of a pathname to a restricted directory (CWE-22) combined with the inclusion of functionality from an untrusted control sphere (CWE-829). The security flaw exists within the parsing and processing of custom Microsoft-specific AI extensions: x-ai-adaptive-card and x-ai-capabilities. These schema extensions allow developers to link to external adaptive card templates and runtime specifications, but Kiota historically did not validate the target locations of these linked assets.

When a developer uses a vulnerable version of Kiota to process a maliciously crafted OpenAPI specification, the tool outputs a plugin manifest file (<name>-apiplugin.json) that carries the unvalidated directory traversal payload. When this output manifest is later sideloaded or deployed into an execution environment, such as Microsoft 365 Copilot or Microsoft Teams, the runtime host attempts to load the defined file relative to the plugin package directory. Because the path is not restricted, the host traverses the local filesystem, leading to unauthorized read-access of arbitrary host-level configurations and system files.

Root Cause Analysis

The underlying cause of CVE-2026-59864 lies in a fundamental trust boundary violation within Kiota's generation pipeline. In the affected versions, PluginsGenerationService.cs acts as the coordinator that transforms OpenAPI metadata into JSON structures used by Microsoft 365 Copilot. When processing the custom keys x-ai-adaptive-card and x-ai-capabilities, the service extracts the string parameter associated with the property path response_semantics.static_template.file.

The parsing service assumed that all file paths specified in the OpenAPI specification were benign, local, and relative to the generation workspace. No schema validation or boundary checks were executed against this parameter. Consequently, string inputs containing directory traversal sequences (such as ../ or ..\\), absolute local paths, or network-based file locations were accepted without modification.

These path strings were compiled directly into the resulting plugin manifest file. This structure delegates the file resolution responsibility to the downstream runtime host. When the execution host loads the deployment package, it parses the manifest, identifies the file reference, and resolves it. Because the input was not sanitized during compilation, the host executes the traversal commands, moving beyond the plugin's sandbox directory and accessing the host system's file system directly under the privileges of the active application process.

Code-Level Analysis of Vulnerability and Patch

Prior to the release of version 1.32.5, Kiota had no security layers validating file references extracted from parsed OpenAPI documents. The tool recursively scanned incoming JSON or YAML nodes and directly serialized them into the manifest stream. The fix, introduced in commit 9a185994a4e549b7bba3cc2beffb9736aa902e79, establishes the ExtensionResponseSemanticsStaticTemplate validation class to enforce safe, relative path parameters.

Below is the logic implemented in the patch to validate the incoming file references:

public class ExtensionResponseSemanticsStaticTemplate
{
    public JsonObject Template { get; init; } = new();
 
    public string? File =>
        Template.TryGetPropertyValue("file", out var fileNode) &&
        fileNode is JsonValue fileValue &&
        fileValue.TryGetValue<string>(out var file)
            ? file
            : null;
 
    public bool HasUnsafeFileReference => File is not null && !IsSafeFileReference(File);
 
    public static bool IsSafeFileReference(string? file)
    {
        if (string.IsNullOrWhiteSpace(file))
        {
            return false;
        }
 
        // 1. Reject absolute URIs (e.g., http://, file://, ftp://)
        if (Uri.TryCreate(file, UriKind.Absolute, out _))
        {
            return false;
        }
 
        // Normalize directory separators for cross-platform validation
        var normalized = file.Replace('\\', '/');
 
        // 2. Reject POSIX-absolute and UNC-style rooted paths
        if (normalized.StartsWith('/'))
        {
            return false;
        }
 
        // 3. Reject Windows drive-qualified paths (e.g. C:\)
        if (normalized.Length >= 2 && normalized[1] == ':')
        {
            return false;
        }
 
        // 4. Reject parent directory traversal segments (..)
        foreach (var segment in normalized.Split('/'))
        {
            if (segment == "..")
            {
                return false;
            }
        }
 
        return true;
    }
}

The implementation targets key evasion techniques. Converting backslashes (\\) to forward slashes (/) handles Windows-specific and POSIX-specific paths uniformly. Splitting by / and verifying each individual segment ensures that partial matches or complex relative structures (e.g., .../ or nested directories containing double dots) are evaluated. If HasUnsafeFileReference returns true, the code omits the invalid reference and issues a warning, which prevents the compiler from emitting malicious parameters to the generated output JSON.

Exploitation Methodology and Attack Path

To exploit this vulnerability, an attacker must first draft a malicious OpenAPI specification document containing a targeted path traversal sequence within the Microsoft AI extensions. The attacker then distributes this document to target developers or automates its delivery through package registries, public APIs, or social engineering. The developer compiles the document using the local Kiota CLI.

When Kiota parses this document, it propagates the string literal ../../../../../../etc/passwd or a Windows-specific path such as ..\\..\\..\\windows\\system32\\config\\sam into the final manifest file without raising an error. Once the compiled manifest is bundled into a plugin package and uploaded to an enterprise's Microsoft 365 Copilot execution tenant, the host service parses the plugin specifications. The execution engine attempts to locate the Adaptive Card or capabilities file using the defined directory traversal instructions, reading files outside the sandbox and returning their contents to the calling context.

Impact Assessment

The impact of successful exploitation is high, as reflected by the CVSS 4.0 base score of 9.3. The severity is driven by the potential for remote, unauthenticated attackers to obtain high-privilege read access to the local filesystem of downstream runtime hosts. This bypasses structural application container boundaries, turning a presentation-layer card rendering feature into a vector for local file disclosure.

The 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 indicates that network access is sufficient to deliver the exploit, no special architectural barriers exist, and the outcome has a high impact on confidentiality, integrity, and availability. Compromising these environments can expose sensitive administrative credentials, cryptographic secrets, database configuration files, and internal network maps, allowing attackers to plan secondary internal network propagation campaigns.

Bypass and Verification Analysis

A detailed evaluation of the validation routines in version 1.32.5 reveals that while the sanitization of relative directory steps is thorough, defensive engineers must monitor the execution paths of downstream hosts. If a downstream runtime host performs URL decoding or parsing on the static_template.file string after extracting it from the manifest JSON, double-encoded traversal sequences like %252e%252e%252f could potentially bypass the initial compiler checks.

Additionally, validation relies on the strict identification of double-dot (..) segments. If the downstream file parser processes alternative Unicode normalization forms (such as transforming fullwidth characters like ../ into standard ../ segments) and Kiota does not enforce Unicode normalization before running its boundary checks, a validation bypass remains possible. Downstream AI hosts must employ defense-in-depth measures, enforcing absolute path checks at the runtime layer to ensure that the resolved path does not leave the boundary of the isolated application directory.

Mitigation and Remediation Guidance

Remediation requires immediately upgrading the Microsoft Kiota compiler toolchain and its associated development libraries to version 1.32.5 or higher. Developers can update the globally installed dotnet tool by running dotnet tool update -g Microsoft.OpenAPI.Kiota in their command terminals.

For enterprise environments unable to perform immediate upgrades, manual validation controls must be implemented at the gateway or deployment level. All custom OpenAPI files should be scanned for the presence of x-ai-capabilities and x-ai-adaptive-card extensions, and any containing the literal character sequences .. or leading slashes in file parameters should be blocked. Additionally, security teams must inspect generated output manifests for path traversal sequences before approving plugin packages for tenant deployment.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.3/ 10
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
EPSS Probability
1.27%
Top 33% most exploited

Affected Systems

Microsoft Kiota Command Line ToolMicrosoft Kiota VS Code ExtensionMicrosoft Kiota NuGet Library Packages

Affected Versions Detail

Product
Affected Versions
Fixed Version
kiota
microsoft
< 1.32.51.32.5
AttributeDetail
CWE IDCWE-22, CWE-829
Attack VectorNetwork
CVSS Severity9.3 Critical
EPSS Score0.01275 (66.88th percentile)
ImpactArbitrary Out-of-Package Local File Inclusion (LFI)
Exploit StatusPoC available in test suite
KEV StatusNot listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located under a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Vulnerability Timeline

Vulnerability patched via Commit 9a185994a4e549b7bba3cc2beffb9736aa902e79
2026-07-03
Vulnerability officially disclosed under CVE-2026-59864 and GHSA-4jwf-m4wg-8p66
2026-07-16

References & Sources

  • [1]GHSA-4jwf-m4wg-8p66: Out-of-package file inclusion in Kiota generated plugins
  • [2]NVD CVE Record for CVE-2026-59864
  • [3]Kiota Fix Commit 9a185994a4e549b7bba3cc2beffb9736aa902e79

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
8 views•5 min read
•1 day ago•CVE-2026-107848
3.5

CVE-2026-107848: Cross-Site Request Forgery (CSRF) in Contao Backend Actions via GET Requests

Contao Open Source CMS versions 4.0.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 contain a Cross-Site Request Forgery (CSRF) vulnerability in backend parameter handling. The `RequestTokenListener` component validates anti-CSRF tokens solely for HTTP POST requests, while GET-based declarative guards run only when an `act` parameter is present in the query string. Consequently, custom backend actions dispatched via alternative parameters such as `key=` can execute without CSRF token verification when triggered by an authenticated user.

Amit Schendel
Amit Schendel
8 views•5 min read
•1 day ago•CVE-2026-107843
5.3

CVE-2026-107843: Unthrottled Activation Email Resend and Account Enumeration in Contao CMS

Contao CMS versions 4.1.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 fail to validate form submission tokens and enforce rate limiting when processing activation email resend requests via HTTP POST, enabling resource exhaustion and account state enumeration.

Amit Schendel
Amit Schendel
8 views•4 min read
•1 day ago•CVE-2026-107842
5.3

CVE-2026-107842: Information Disclosure via Stale Indexing in Contao Search Module

An information disclosure vulnerability in Contao CMS allows unauthenticated site visitors to view protected page titles, URLs, and text excerpts through search queries when protected page indexing is disabled after previously being enabled.

Amit Schendel
Amit Schendel
10 views•4 min read
•1 day ago•GHSA-G38J-7V97-X298
6.5

GHSA-G38J-7V97-X298: Missing Authorization Check in Vikunja CalDAV Task Relation Creation

In Vikunja prior to version 2.6.0, relation creation via the CalDAV endpoint fails to invoke the TaskRelation.CanCreate authorization check. This missing access control allows an authenticated user to establish unauthorized relationships and perform write operations against any task, provided its unique identifier (UID) is known.

Alon Barad
Alon Barad
12 views•5 min read
•1 day ago•GHSA-3HC7-R24J-RPWC
6.8

GHSA-3hc7-r24j-rpwc: Cross-Project Task Disclosure via Subtask Expansion in Vikunja

A cross-project information disclosure vulnerability in Vikunja allows authenticated users with read access to one project to view private task details from unauthorized projects via subtask expansion parameters.

Alon Barad
Alon Barad
9 views•5 min read