Summary
Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
Microsoft Kiota resolved OpenAPI $refs by fetching remote http(s) URLs and reading local files
(including absolute / out-of-tree paths), inlining the referenced schema into the generated client.
Running kiota generate on a spec whose $ref pointed at an attacker/internal URL or an arbitrary
local file yielded SSRF, remote file inclusion, and local file inclusion. Verified on 1.32.3 / 1.32.4.
Details
$ref: http://attacker/internal-evil.json#/...→ build host fetches the URL (SSRF) and inlines the
remote schema (RFI); confirmed propertyREMOTE_KIOTA_PROPin the generated client.$ref: /abs/path.json#/...or../../secret.json#/...→ Kiota reads the out-of-tree local file and
inlines its schema (LFI); confirmedLeakedschema in the generated client. Resolution is transitive
across nesting levels.
Kiota escapes its output sinks (comments/strings/identifiers), so attacker-controlled remote/local
content cannot break out into code, no RCE. The chain stops at SSRF + RFI + LFI.
Remediation
Upgrade to Kiota 1.32.5 or later. External references now require explicit opt-in via--allowed-external-origins; add only trusted origins/paths.
Impact
Build-time SSRF (CWE-918) from the developer or CI host, disclosure of arbitrary local files (CWE-22), and
inclusion of untrusted remote content (CWE-829), from running the generator on an attacker-controlled or
attacker-influenced OpenAPI description. No code execution. Notable because Kiota is otherwise the hardened
generator (it resists the code-injection class).
The relevant threat is not "change the generated output" (an attacker who fully controls the description can
already do that) but the side effects on the build host: outbound requests from inside the CI network
(cloud metadata, internal-only services) and reads of local files the attacker never possessed, whose contents
are then inlined into the generated, and typically committed/published, client. It also bypasses controls
that review the description document but not externally-referenced content.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2026-59867 has a CVSS score of 7.1 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.32.5); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in 1.32.5 (https://github.com/microsoft/kiota/pull/7888). External reference resolution is now
default-deny: a new AllowedExternalOriginsStreamLoader refuses to load any external $ref, remotehttp(s) URLs and local file paths alike, unless its origin/path is explicitly allow-listed. A new--allowed-external-origins parameter (added to the commands that load OpenAPI descriptions) opts specific
origins back in, accepting *, full URIs, URI patterns, full paths, relative paths, or path patterns
(wildcards supported). With no allow-list entries, external references are not loaded at all.
Frequently Asked Questions
- What is CVE-2026-59867? CVE-2026-59867 is a high-severity path traversal vulnerability in Microsoft.OpenApi.Kiota (nuget), affecting versions < 1.32.5. It is fixed in 1.32.5. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2026-59867? CVE-2026-59867 has a CVSS score of 7.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-59867?
Microsoft.OpenApi.Kiota(nuget) (versions < 1.32.5)Microsoft.OpenApi.Kiota.Builder(nuget) (versions < 1.32.5)
- Is there a fix for CVE-2026-59867? Yes. CVE-2026-59867 is fixed in 1.32.5. Upgrade to this version or later.
- Is CVE-2026-59867 exploitable, and should I be worried? Whether CVE-2026-59867 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-59867 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-59867?
- Upgrade
Microsoft.OpenApi.Kiotato 1.32.5 or later - Upgrade
Microsoft.OpenApi.Kiota.Builderto 1.32.5 or later
- Upgrade