Kiota: Workspace-config poisoning: out-of-repo file write + generation-time SSRF
microsoft kiota
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Microsoft.OpenApi.Kiota NuGet |
|
|
| Microsoft.OpenApi.Kiota.Builder NuGet |
|
microsoft kiota
| Product | Affected | Fixed in |
|---|---|---|
| Microsoft.OpenApi.Kiota NuGet |
|
|
| Microsoft.OpenApi.Kiota.Builder NuGet |
|
|
Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, Kiota honored a poisoned .kiota/workspace.json workspace configuration without validating per-client or per-plugin outputPath values during kiota client generate and kiota plugin generate, allowing a malicious repository or pull request to use absolute paths, rooted POSIX / paths, UNC \\ or // paths, Windows drive X:\ paths, or .. traversal segments to write generated client files outside the workspace root on a developer or CI host. This issue is fixed in version 1.29.1 and 1.32.5.
From the CVE record · GitHub_M
Kiota does not validate output paths in .kiota/workspace.json when generating clients or plugins. A malicious repository or pull request can cause generated files to be written outside the workspace root if a developer or CI host runs generation using the poisoned configuration.
Teams using NuGet Microsoft.OpenApi.Kiota or Microsoft.OpenApi.Kiota.Builder versions below 1.29.1, or versions from 1.30.0 up to but not including 1.32.5, should check their installations.