Kiota: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
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 resolved OpenAPI $ref values by fetching remote http(s) URLs and reading local absolute or out-of-tree file paths, allowing `kiota generate` on an attacker-controlled or attacker-influenced description to perform build-time SSRF, remote file inclusion, and local file inclusion by inlining external schemas such as REMOTE_KIOTA_PROP or Leaked into generated clients. This issue is fixed in version 1.29.1 and 1.32.5 by AllowedExternalOriginsStreamLoader and the --allowed-external-origins option.
From the CVE record · GitHub_M
Kiota can fetch remote URLs or read local files while resolving OpenAPI $ref values. Running `kiota generate` on an attacker-controlled or attacker-influenced description can cause build-time SSRF, remote file inclusion, or local file inclusion in generated clients.
Check projects using the NuGet packages Microsoft.OpenApi.Kiota or Microsoft.OpenApi.Kiota.Builder in versions below 1.29.1 or from 1.30.0 up to but not including 1.32.5.