CVE-2026-59863: Microsoft.OpenApi.Kiota Out-of-repo File Write + Generation-time Vulnerability

HIGH
Advisory Identifier: GHSA-4rj6-vrwv-wr8m
CWE-829 CWE-918 CWE-22
Published
Advisory Summary

CVE-2026-59863 is a HIGH out-of-repo file write + generation-time vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Microsoft.OpenApi.Kiota libraries in the NuGet ecosystem. The issue involves out-of-repo file write + generation-time ssrf. Remediation is available by upgrading affected packages to version 1.32.5, 1.29.1.

CVE-2026-59863 at a Glance

CVE Identifier CVE-2026-59863
GHSA Identifier GHSA-4rj6-vrwv-wr8m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Microsoft.OpenApi.Kiota
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix CVE-2026-59863

To remediate this vulnerability, upgrade all affected Microsoft.OpenApi.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-59863, inspect your project dependencies for Microsoft.OpenApi.Kiota:

inspect dependencies for Microsoft.OpenApi.Kiota

Analyze the terminal output to locate any version of Microsoft.OpenApi.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.OpenApi.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 Microsoft Kiota honors a poisoned `.kiota/workspace.json` — the workspace configuration that Kiota's documented team workflow has developers commit to their repository — **unvalidated** on `kiota client generate` / `kiota plugin generate`. A repository (or pull request) containing a malicious per-client / per-plugin `outputPath` causes Kiota, when a developer or CI runs the documented regenerate command, to **(CWE-22) write the entire generated client to an arbitrary path outside the workspace** — the `outputPath` was not confined to the workspace root and absolute paths were accepted. Confirmed on Kiota **1.32.4** (`KIOTA_CONFIG_PREVIEW=true`, the self-contained `linux-x64` release binary). ### Details ```jsonc // .kiota/workspace.json (committed to the repo) "clients": { "MyClient": { "outputPath": "/abs/path/outside/repo/pwned_client" // -> generated client written here (CWE-22) }} ``` Running `kiota client generate --client-name MyClient` in the repo writes `MyClient.cs`, `P/PRequestBuilder.cs`, … to the attacker-chosen `outputPath` (verified outside the working tree). #### Note on `descriptionLocation` The per-consumer `descriptionLocation` is intentionally fetched at generation time — this is how Kiota knows where to pull an updated description from when refreshing a client, the same way any other value in a committed lock/config file is honored. It is **not** treated as a vulnerability and is unchanged; only `outputPath` is now confined. ### Impact A malicious or compromised repository — or a malicious PR that edits `.kiota/workspace.json` — leads to arbitrary file write on the developer's or CI host's filesystem (overwrite source/build files, drop files in auto-loaded locations) whenever a teammate clones/pulls and runs the documented `kiota client generate` / `kiota plugin generate` to refresh the client. CWE-22. This is a different trust boundary from the OpenAPI-description-based findings: the malicious input is the Kiota **config**, not the spec. ### Patches Fixed in **1.29.1 and 1.32.5** (https://github.com/microsoft/kiota/pull/7885). On loading a workspace configuration, each client/plugin `outputPath` is validated to be a relative subdirectory of the workspace: null/empty, rooted paths (POSIX `/`, UNC `\\` / `//`, Windows drive `X:\`), and any `..` traversal segment are rejected, and the resolved full path must stay under the workspace root. Generation aborts with an error if any consumer's `outputPath` escapes the workspace. ### Remediation Upgrade to Kiota **1.29.1, 1.32.5** or later. Review any committed workspace configs for `outputPath` values that point outside the workspace.

CVE-2026-59863 Affected Microsoft.OpenApi.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-59863?
CVE-2026-59863 is a security vulnerability in Microsoft.OpenApi.Kiota involving out-of-repo file write + generation-time SSRF under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Microsoft.OpenApi.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-59863?
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-59863?
CVE-2026-59863 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-59863?
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-4rj6-vrwv-wr8m",
  "modified" : "2026-08-17T14:54:18Z",
  "published" : "2026-07-24T16:11:24Z",
  "aliases" : [ "CVE-2026-59863" ],
  "summary" : "Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF",
  "details" : "### Summary\n\nMicrosoft Kiota honors a poisoned `.kiota/workspace.json` — the workspace configuration that Kiota's\ndocumented team workflow has developers commit to their repository — **unvalidated** on\n`kiota client generate` / `kiota plugin generate`. A repository (or pull request) containing a malicious\nper-client / per-plugin `outputPath` causes Kiota, when a developer or CI runs the documented regenerate\ncommand, to **(CWE-22) write the entire generated client to an arbitrary path outside the workspace** — the\n`outputPath` was not confined to the workspace root and absolute paths were accepted.\n\nConfirmed on Kiota **1.32.4** (`KIOTA_CONFIG_PREVIEW=true`, the self-contained `linux-x64` release binary).\n\n### Details\n\n```jsonc\n// .kiota/workspace.json (committed to the repo)\n\"clients\": { \"MyClient\": {\n   \"outputPath\": \"/abs/path/outside/repo/pwned_client\"   // -> generated client written here (CWE-22)\n}}\n```\n\nRunning `kiota client generate --client-name MyClient` in the repo writes `MyClient.cs`,\n`P/PRequestBuilder.cs`, … to the attacker-chosen `outputPath` (verified outside the working tree).\n\n#### Note on `descriptionLocation`\n\nThe per-consumer `descriptionLocation` is intentionally fetched at generation time — this is how Kiota knows\nwhere to pull an updated description from when refreshing a client, the same way any other value in a\ncommitted lock/config file is honored. It is **not** treated as a vulnerability and is unchanged; only\n`outputPath` is now confined.\n\n### Impact\n\nA malicious or compromised repository — or a malicious PR that edits `.kiota/workspace.json` — leads to\narbitrary file write on the developer's or CI host's filesystem (overwrite source/build files, drop files in\nauto-loaded locations) whenever a teammate clones/pulls and runs the documented `kiota client generate` /\n`kiota plugin generate` to refresh the client. CWE-22.\n\nThis is a different trust boundary from the OpenAPI-description-based findings: the malicious input is the\nKiota **config**, not the spec.\n\n### Patches\n\nFixed in **1.29.1 and 1.32.5** (https://github.com/microsoft/kiota/pull/7885). On loading a workspace configuration,\neach client/plugin `outputPath` is validated to be a relative subdirectory of the workspace: null/empty,\nrooted paths (POSIX `/`, UNC `\\\\` / `//`, Windows drive `X:\\`), and any `..` traversal segment are rejected,\nand the resolved full path must stay under the workspace root. Generation aborts with an error if any\nconsumer's `outputPath` escapes the workspace.\n\n### Remediation\n\nUpgrade to Kiota **1.29.1, 1.32.5** or later. Review any committed workspace configs for `outputPath` values that\npoint outside the workspace.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:L/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-4rj6-vrwv-wr8m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59863"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/pull/7885"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/microsoft/kiota/commit/4049327872db7846ace35c9003774d3e3878e4e9"
  }, {
    "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", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T16:11:24Z",
    "nvd_published_at" : "2026-07-16T15:16:35Z"
  }
}