Medium

Microsoft Kiota: Path traversal in generated plugin manifest static_template.file reference (percent-encoding bypass)

  • Disclosed: 24.07.2026
  • Updated: 11.10.2026 11:23

Impact

Kiota generates AI plugin manifests from an OpenAPI description. When the description contains an x-ai-capabilities response semantics static_template (or the adaptive-card extension x-ai-adaptive-card), the file reference is written into the generated manifest's response_semantics.static_template.file and is later resolved by the AI host relative to the plugin package.

An attacker who controls or tampers with the OpenAPI description consumed by Kiota can supply a file reference that resolves outside the manifest package (e.g. ../../../../etc/passwd, an absolute path, or a file:// / http(s):// URI). When the generated manifest is deployed and consumed by an AI host, this can lead to inclusion or disclosure of files outside the intended package boundary (CWE-22 Path Traversal, CWE-829 Inclusion of Functionality from an Untrusted Control Sphere).

A mitigation shipped in v1.32.5 (ExtensionResponseSemanticsStaticTemplate.IsSafeFileReference) rejected literal traversal, rooted paths, drive-qualified paths, and absolute URIs. However, that check inspected the raw reference string, so percent-encoded payloads bypassed every check and were still emitted verbatim. Examples that were incorrectly accepted as safe:

Input Decodes to
%2e%2e/card.json ../card.json
..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd ../../../../../../etc/passwd
file%3A%2F%2F%2Fetc%2Fpasswd file:///etc/passwd
%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd ../../../etc/passwd

Multi-level (double) encoding such as %252e%252e%252fcard.json was also affected. A follow-up review found additional residual bypasses of the same validator: an embedded NUL byte (%00) that truncated the path and defeated the parent-directory segment check, encoding nested deeper than the decode budget (which failed open), and Unicode full-width homoglyphs (e.g. %EF%BC%8E%EF%BC%8E → ..).

Patches

Users should upgrade to the first released Microsoft.OpenApi.Kiota version that includes these fixes (the release following 1.33.0).

Workarounds

  • Only generate clients/plugins from trusted OpenAPI descriptions.
  • Review generated plugin manifests before deployment and reject any response_semantics.static_template.file value that is not a simple relative path within the adaptiveCards/ package folder (no .., no rooted/absolute paths, no URIs, no percent-encoded separators).

References

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-829: Inclusion of Functionality from an Untrusted Control Sphere
  • Affected code: src/Kiota.Builder/OpenApiExtensions/OpenApiAiCapabilitiesExtension.cs (IsSafeFileReference) and enforcement in src/Kiota.Builder/Plugins/PluginsGenerationService.cs.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
.NET (NuGet) Microsoft.OpenApi.Kiota >= 1.30.0, < 1.34.0, < 1.29.1 1.34.0, 1.29.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
Weakness (CWE)
CWE-22, CWE-829
Platform
.NET (NuGet)
Package
Microsoft.OpenApi.Kiota
Disclosed
24.07.2026
Updated
11.10.2026 11:23

Sources and licenses

OSV / GitHub Advisory Database - GHSA-p5rm-jg5c-8c77 - CC BY 4.0

Vulnerability history: Microsoft.OpenApi.Kiota

All published vulnerabilities of this package (.NET (NuGet)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (13) in the archive
Total entries
13
First → latest
04.2026 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 9
  • Medium 1
  • Low 1

Disclosures per year

  1. 2026: 13
Severity:
  1. Microsoft Kiota: Path traversal in generated plugin manifest static_template.file reference (percent-encoding bypass) this entry
    Medium CVE-2026-73851 >= 1.30.0, < 1.34.0, < 1.29.1 1.34.0, 1.29.1
  2. Critical CVE-2026-59865 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  3. High CVE-2026-59863 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  4. High · 7.1 CVE-2026-59867 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  5. Critical CVE-2026-59864 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  6. High CVE-2026-59859 >= 1.30.0, < 1.32.4, < 1.29.1 1.32.4, 1.29.1
  7. High · 7.5 CVE-2026-59862 >= 1.30.0, < 1.32.0, < 1.29.1 1.32.0, 1.29.1
  8. High · 7.5 CVE-2026-59861 >= 1.30.0, < 1.32.0, < 1.29.1 1.32.0, 1.29.1
  9. High CVE-2026-59860 >= 1.30.0, < 1.32.3, < 1.29.1 1.32.3, 1.29.1
  10. High · 0.0 CVE-2026-41134 >= 1.30.0, < 1.31.1, < 1.29.1 1.31.1, 1.29.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.