{"id":"CVE-2026-59863","aliases":["CVE-2026-59863","GHSA-4rj6-vrwv-wr8m"],"related":[],"kind":"vulnerability","state":"published","title":"Kiota: Workspace-config poisoning: out-of-repo file write + generation-time SSRF","summary":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota honored a poisoned .kiota/workspace.json workspace configuration without validating per-client or per-plugin outputPath values during kiota client generate and kiota plugin generate, allowing a malicious repository or pull request to use absolute paths, rooted POSIX / paths, UNC \\\\ or // paths, Windows drive X:\\ paths, or .. traversal segments to write generated client files outside the workspace root on a developer or CI host. This issue is fixed in version 1.29.1 and 1.32.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota honored a poisoned .kiota/workspace.json workspace configuration without validating per-client or per-plugin outputPath values during kiota client generate and kiota plugin generate, allowing a malicious repository or pull request to use absolute paths, rooted POSIX / paths, UNC \\\\ or // paths, Windows drive X:\\ paths, or .. traversal segments to write generated client files outside the workspace root on a developer or CI host. This issue is fixed in version 1.29.1 and 1.32.5.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Kiota es un generador de código de cliente HTTP basado en OpenAPI. Antes de la versión 1.32.5, Kiota respetaba una configuración de espacio de trabajo .kiota/workspace.json envenenada sin validar los valores de outputPath por cliente o por plugin durante kiota client generate y kiota plugin generate, permitiendo que un repositorio malicioso o una solicitud de extracción utilizara rutas absolutas, rutas POSIX / con raíz, rutas UNC \\\\ o //, rutas de unidad de Windows X:\\, o segmentos de recorrido .. para escribir archivos de cliente generados fuera de la raíz del espacio de trabajo en un host de desarrollador o CI. Este problema está solucionado en la versión 1.32.5.","source":"nvd"}],"published":"2026-07-16T14:42:02.337Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-22","CWE-829","CWE-918"],"affected":[{"ranges":[{"version":">= 1.30.0, < 1.31.1","status":"affected"},{"version":"< 1.29.1","status":"affected"}],"vendor":"microsoft","product":"kiota","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.30.0","status":"affected","fixed":"1.32.5"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.30.0","status":"affected","fixed":"1.32.5"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.29.1"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","purl":"pkg:nuget/Microsoft.OpenApi.Kiota","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.29.1"}],"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","purl":"pkg:nuget/Microsoft.OpenApi.Kiota.Builder","source":"ghsa"}],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-4rj6-vrwv-wr8m","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/pull/7885","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/commit/4049327872db7846ace35c9003774d3e3878e4e9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59863","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/microsoft/kiota","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-16T15:22:52.387Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-59863","url":"https://www.cve.org/CVERecord?id=CVE-2026-59863","licence":"CVE Terms of Use","modified":"2026-08-17T15:02:40.475Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4rj6-vrwv-wr8m","url":"https://github.com/advisories/GHSA-4rj6-vrwv-wr8m","licence":"CC-BY-4.0","modified":"2026-08-17T15:00:08.071Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-59863","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59863","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.390Z","epss":{"score":0.01374,"percentile":0.72208,"date":"2026-11-30T12:00:22.000Z"}}