Rancher vulnerable to command injection through unsanitized YAML parameter
Date: 2026-07
Affected: go/github.com/rancher/rancher, go/github.com/rancher/rancher, go/github.com/rancher/rancher
Attack vector: command-injection
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2026-44939
CWE: CWE-95
CVSS: 9.6 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H)

### Impact A critical command injection vulnerability has been identified in the Rancher Manager cluster import endpoint `/v3/import/{token}_{clusterId}.yaml` through unsanitized YAML parameters. This endpoint accepts an `authImage` query parameter that is rendered without sanitization into a generated Kubernetes manifest template. By including URL-encoded newlines in the parameter value, an attacker can break out of the `image:` field to inject arbitrary YAML keys and malicious configurations, such as commands to execute malicious containers. Exploitation of this vulnerability requires the following conditions to be met: - Attackers must obtain a valid cluster registration token (these tokens may be exposed, for example, through documentation, screenshots, or insecure communication channels). - The victim’s cluster operator must execute `kubectl apply` against a maliciously crafted URL. When a victim applies this compromised manifest using `kubectl apply`, a DaemonSet is deployed with the injected configuration. This DaemonSet: - Runs on all control-plane nodes with `hostNetwork: true` enabled. - Uses the `cattle` service account, which possesses `cluster-admin` privileges. - Mounts `/etc/kubernetes` directly from the host. - Executes attacker-controlled commands via the injected `command:` field. An attacker who successfully exploits this vulnerability could: - Achieve full control over downstream Kubernetes clusters. - Execute arbitrary code on control-plane nodes wi


Mitigations:

Architectural layers (MAESTRO):