Skip to main content

CVE-2026-73851 — Microsoft Kiota: Path traversal in...

MEDIUM

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

Published July 24, 2026Updated August 17, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (2.28%). Schedule for your next planned update.

Does your project use an affected Microsoft.OpenApi.Kiota version?

Paste your packages.lock.json to check it for CVE-2026-73851 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my packages.lock.json

Summary

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:

InputDecodes to
%2e%2e/card.json../card.json
..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd../../../../../../etc/passwd
file%3A%2F%2F%2Fetc%2Fpasswdfile:///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.

Advisory Timeline

  • First published July 24, 2026 (125 days ago).
  • Last revised August 17, 2026 — 24 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Microsoft.OpenApi.Kiota to 1.29.1 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.29.1
NuGet
Update Microsoft.OpenApi.Kiota to 1.34.0 or later
dotnet add package Microsoft.OpenApi.Kiota --version 1.34.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: NuGet (1).

PackageFixed In
Microsoft.OpenApi.Kiota NuGet · Affected: 0.1.0-preview, 0.1.1-preview, 0.1.2-preview, 0.1.3-preview (+62 more)1.29.1
Microsoft.OpenApi.Kiota NuGet · Affected: 1.30.0, 1.31.0, 1.31.1, 1.32.0 (+6 more)1.34.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-73851?
Microsoft Kiota: Path traversal in generated plugin manifest static_template.file reference (percent-encoding bypass). This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.9/10).
How do I check if my project is affected by CVE-2026-73851?
CVE-2026-73851 affects Microsoft.OpenApi.Kiota. It has a 2.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-73851 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.9

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
2.28%
EPSS percentile: 83.8

This places it in the top quartile of EPSS-scored vulnerabilities — 83.8% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-p5rm-jg5c-8c77

Related CVEs

  • CVE-2026-59864
    CRITICAL

    Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions

  • CVE-2026-59865
    CRITICAL

    Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`

  • CVE-2026-59860
    HIGH

    Microsoft Kiota: XML Doc-Comment Newline Breakout Code Injection

  • CVE-2026-59863
    HIGH

    Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF

  • CVE-2026-59866
    HIGH

    Microsoft Kiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceName

  • CVE-2026-59862
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota Python Generator

  • CVE-2026-59859
    HIGH

    Microsoft Kiota: Code Generation Literal Injection in Kiota PHP Generator

  • CVE-2026-59867
    HIGH

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

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json