GHSA-4jwf-m4wg-8p66

Suggest an improvement
Source
https://github.com/advisories/GHSA-4jwf-m4wg-8p66
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4jwf-m4wg-8p66/GHSA-4jwf-m4wg-8p66.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4jwf-m4wg-8p66
Aliases
Published
2026-07-24T15:58:31Z
Modified
2026-08-17T15:00:08.105064637Z
Severity
  • 9.3 (Critical) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
Microsoft Kiota: Path/URL injection into generated Copilot plugin manifest via x-ai-* extensions
Details

Summary

kiota plugin add / kiota plugin generate (with -t APIPlugin) emits an attacker-controlled static_template.file path from the AI-plugin extensions (x-ai-adaptive-card, x-ai-capabilities) verbatim, with no path validation, into the generated Microsoft 365 Copilot / Teams plugin manifest (<name>-apiplugin.json). An attacker-controlled or compromised OpenAPI description can therefore embed a ../ / absolute path into the manifest's response_semantics.static_template.file, yielding a path traversal (CWE-22) / out-of-package file inclusion (CWE-829) that is resolved by the AI host when the generated plugin is deployed.

Confirmed on Kiota 1.32.4 (KIOTA_CONFIG_PREVIEW=true, the self-contained linux-x64 release binary).

Details

Both extension paths write the static_template.file reference straight into the manifest without sanitization — PluginsGenerationService.GetResponseSemanticsFromAdaptiveCardExtension mints static_template = {"file": <File>}, and the x-ai-capabilities path copies the static_template object through:

# spec                                                  -> generated manifest (functions[].capabilities.response_semantics)
x-ai-adaptive-card: {title: T, data_path: $.x,
   file: "../../../../../../etc/passwd"}                -> static_template.file = "../../../../../../etc/passwd"   (CWE-22)
x-ai-capabilities.response_semantics.static_template:
   {file: "../../../../../../etc/passwd"}               -> static_template.file = "../../../../../../etc/passwd"   (CWE-22)

(x-ai-adaptive-card.file only reaches the manifest when title is set, so GetResponseSemanticsFromAdaptiveCardExtension fires; otherwise kiota writes its own template card instead.)

Impact

This is not local code execution on the build host. The injected path is written into the generated plugin manifest and realized downstream, when the plugin is packaged and sideloaded / deployed to an AI host (Microsoft 365 Copilot / Teams) that resolves static_template.file relative to the plugin package (out-of-package file reference via ../). Kiota is the propagation point: it fails to reject ../ and absolute paths in this provider-supplied field before writing it into the manifest.

Patches

Fixed in 1.29.1 and 1.32.5 (https://github.com/microsoft/kiota/pull/7892). static_template.file from both x-ai-adaptive-card and x-ai-capabilities is validated as a relative path confined to the plugin output package: absolute URIs, rooted/UNC paths, Windows drive paths, and .. traversal segments are rejected, and unsafe references are dropped with a warning. Regression tests cover .., absolute paths, and URI values.

Remediation

Upgrade to Kiota 1.29.1, 1.32.5 or later and regenerate affected plugins.

Database specific
{
    "nvd_published_at": "2026-07-16T16:19:15Z",
    "github_reviewed_at": "2026-07-24T15:58:31Z",
    "severity": "CRITICAL",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-22",
        "CWE-829"
    ]
}
References

Affected packages

NuGet
Microsoft.OpenApi.Kiota

Package

Name
Microsoft.OpenApi.Kiota
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.Kiota

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.30.0
Fixed
1.32.5

Affected versions

1.*
1.30.0
1.31.0
1.31.1
1.32.0
1.32.1
1.32.2
1.32.3
1.32.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4jwf-m4wg-8p66/GHSA-4jwf-m4wg-8p66.json"
Microsoft.OpenApi.Kiota.Builder

Package

Name
Microsoft.OpenApi.Kiota.Builder
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.Kiota.Builder

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.30.0
Fixed
1.32.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4jwf-m4wg-8p66/GHSA-4jwf-m4wg-8p66.json"
Microsoft.OpenApi.Kiota

Package

Name
Microsoft.OpenApi.Kiota
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.Kiota

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.29.1

Affected versions

0.*
0.1.0-preview
0.1.1-preview
0.1.2-preview
0.1.3-preview
0.2.0-preview
0.2.1-preview
0.3.0-preview
0.4.0-preview
0.5.0-preview
0.5.1-preview
0.6.0-preview
0.7.1-preview
0.8.3-preview
0.9.0-preview
0.10.0-preview
0.11.0-preview
0.11.1-preview
1.*
1.0.0
1.0.1
1.1.0
1.1.1
1.1.2
1.1.3
1.2.0
1.2.1
1.3.0
1.4.0
1.5.0
1.5.1
1.6.1
1.7.0
1.8.0
1.8.1
1.8.2
1.9.0
1.9.1
1.10.0
1.10.1
1.11.0
1.11.1
1.12.0
1.13.0
1.14.0
1.15.0
1.16.0
1.17.0
1.18.0
1.19.0
1.19.1
1.20.0
1.21.0
1.22.0
1.22.1
1.22.2
1.22.3
1.23.0
1.24.0
1.24.1
1.24.2
1.24.3
1.25.1
1.26.0
1.26.1
1.27.0
1.28.0
1.29.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4jwf-m4wg-8p66/GHSA-4jwf-m4wg-8p66.json"
Microsoft.OpenApi.Kiota.Builder

Package

Name
Microsoft.OpenApi.Kiota.Builder
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.Kiota.Builder

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.29.1

Affected versions

0.*
0.2.0-preview
0.3.0-preview
0.4.0-preview
0.5.0-preview
0.5.1-preview
0.6.0-preview
0.7.1-preview
1.*
1.0.0
1.0.1
1.1.0
1.1.1
1.1.2
1.1.3
1.2.0
1.2.1
1.3.0
1.4.0
1.5.0
1.5.1
1.6.1
1.7.0
1.8.0
1.8.1
1.8.2
1.9.0
1.9.1
1.10.0
1.10.1
1.11.0
1.11.1
1.12.0
1.13.0
1.14.0
1.15.0
1.16.0
1.17.0
1.18.0
1.19.0
1.19.1
1.20.0
1.21.0
1.22.0
1.22.1
1.22.2
1.22.3
1.23.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4jwf-m4wg-8p66/GHSA-4jwf-m4wg-8p66.json"