CVE-2026-59867

Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref

Published Jul 16, 2026 CVSS 3.1 · 7.1 High EPSS 2.4% KEV · Not listed
Description
Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota resolved OpenAPI $ref values by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths, allowing `kiota generate` on an attacker-controlled or attacker-influenced description to perform build-time SSRF, remote file inclusion, and local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or Leaked into generated clients. This issue is fixed in version 1.29.1 and 1.32.5 by AllowedExternalOriginsStreamLoader and the --allowed-external-origins option.

Analysis

AI-generated

Technical impact

Kiota is an OpenAPI based HTTP client generator that, prior to releases 1.29.1 and 1.32.5, resolved $ref references by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths during code generation. This behavior allowed an attacker to supply a malicious or attacker-controlled OpenAPI specification to the \"kiota generate\" process, leading to build-time server side request forgery and remote or local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or exposing leaks into generated clients. The issue is classified under CWE-22 (Absolute Path Traversal), CWE-829 (Code Signing Verification), and CWE-918 (Server Side Request Forgery).

Affected Systems

Microsoft Kiota versions before 1.32.5 are vulnerable. The fix is delivered in commit cccd798027f0a20db796b3df6c64f9897a39d7b1 and published in release v1.32.5.

Risk and Exploitability

The CVSS score of 7.1 denotes high severity. The EPSS score of 2% indicates that the exploit probability is low but non‑zero. The vulnerability is not listed in CISA KEV. The attack vector is build-time; an attacker can trigger the flaw by inserting a malicious OpenAPI definition into a trusted build or CI environment. Successful exploitation can lead to arbitrary code execution on the machine that runs the generator, or to the extraction or tampering of files on that system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Microsoft Kiota to version 1.32.5 or later, which introduces AllowedExternalOriginsStreamLoader and the --allowed-external-origins option to control $ref resolution.
  • If an upgrade cannot occur immediately, run Kiota in a container or isolated environment and use the --allowed-external-origins flag to restrict $ref resolution to trusted domains or disable external fetching entirely.
  • Validate any OpenAPI specification before generation, ensuring it originates from a trusted source and contains no malicious $ref entries.

Generated by OpenCVE AI on August 17, 2026 at 20:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-rg4h-fpcp-2qm8 Microsoft Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
History
Type Values Removed Values Added
Description Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.5, Kiota resolved OpenAPI $ref values by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths, allowing `kiota generate` on an attacker-controlled or attacker-influenced description to perform build-time SSRF, remote file inclusion, and local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or Leaked into generated clients. This issue is fixed in version 1.32.5 by AllowedExternalOriginsStreamLoader and the --allowed-external-origins option. Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota resolved OpenAPI $ref values by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths, allowing `kiota generate` on an attacker-controlled or attacker-influenced description to perform build-time SSRF, remote file inclusion, and local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or Leaked into generated clients. This issue is fixed in version 1.29.1 and 1.32.5 by AllowedExternalOriginsStreamLoader and the --allowed-external-origins option.
Type Values Removed Values Added
First Time appeared Microsoft
Microsoft kiota
Vendors & Products Microsoft
Microsoft kiota
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.32.5, Kiota resolved OpenAPI $ref values by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths, allowing `kiota generate` on an attacker-controlled or attacker-influenced description to perform build-time SSRF, remote file inclusion, and local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or Leaked into generated clients. This issue is fixed in version 1.32.5 by AllowedExternalOriginsStreamLoader and the --allowed-external-origins option.
Title Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
Weaknesses CWE-22
CWE-829
CWE-918
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 17, 2026, 3:03 PM
Reserved
Jul 7, 2026, 3:41 PM
Status
Deferred
Published
Jul 16, 2026, 4:19 PM
Modified
Oct 24, 2026, 8:10 PM