GHSA-4rj6-vrwv-wr8m

Suggest an improvement
Source
https://github.com/advisories/GHSA-4rj6-vrwv-wr8m
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4rj6-vrwv-wr8m/GHSA-4rj6-vrwv-wr8m.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4rj6-vrwv-wr8m
Aliases
Published
2026-07-24T16:11:24Z
Modified
2026-08-17T15:00:08Z
Severity
  • 7.0 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
Microsoft Kiota Workspace-config poisoning: out-of-repo file write + generation-time SSRF
Details

Summary

Microsoft Kiota honors a poisoned .kiota/workspace.json — the workspace configuration that Kiota's documented team workflow has developers commit to their repository — unvalidated on kiota client generate / kiota plugin generate. A repository (or pull request) containing a malicious per-client / per-plugin outputPath causes Kiota, when a developer or CI runs the documented regenerate command, to (CWE-22) write the entire generated client to an arbitrary path outside the workspace — the outputPath was not confined to the workspace root and absolute paths were accepted.

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

Details

// .kiota/workspace.json (committed to the repo)
"clients": { "MyClient": {
   "outputPath": "/abs/path/outside/repo/pwned_client"   // -> generated client written here (CWE-22)
}}

Running kiota client generate --client-name MyClient in the repo writes MyClient.cs, P/PRequestBuilder.cs, … to the attacker-chosen outputPath (verified outside the working tree).

Note on descriptionLocation

The per-consumer descriptionLocation is intentionally fetched at generation time — this is how Kiota knows where to pull an updated description from when refreshing a client, the same way any other value in a committed lock/config file is honored. It is not treated as a vulnerability and is unchanged; only outputPath is now confined.

Impact

A malicious or compromised repository — or a malicious PR that edits .kiota/workspace.json — leads to arbitrary file write on the developer's or CI host's filesystem (overwrite source/build files, drop files in auto-loaded locations) whenever a teammate clones/pulls and runs the documented kiota client generate / kiota plugin generate to refresh the client. CWE-22.

This is a different trust boundary from the OpenAPI-description-based findings: the malicious input is the Kiota config, not the spec.

Patches

Fixed in 1.29.1 and 1.32.5 (https://github.com/microsoft/kiota/pull/7885). On loading a workspace configuration, each client/plugin outputPath is validated to be a relative subdirectory of the workspace: null/empty, rooted paths (POSIX /, UNC \\ / //, Windows drive X:\), and any .. traversal segment are rejected, and the resolved full path must stay under the workspace root. Generation aborts with an error if any consumer's outputPath escapes the workspace.

Remediation

Upgrade to Kiota 1.29.1, 1.32.5 or later. Review any committed workspace configs for outputPath values that point outside the workspace.

Database specific
{
    "cwe_ids": [
        "CWE-22",
        "CWE-829",
        "CWE-918"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-24T16:11:24Z",
    "nvd_published_at": "2026-07-16T15:16:35Z",
    "severity": "HIGH"
}
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-4rj6-vrwv-wr8m/GHSA-4rj6-vrwv-wr8m.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-4rj6-vrwv-wr8m/GHSA-4rj6-vrwv-wr8m.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
0 Unknown 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-4rj6-vrwv-wr8m/GHSA-4rj6-vrwv-wr8m.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
0 Unknown 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-4rj6-vrwv-wr8m/GHSA-4rj6-vrwv-wr8m.json"