GHSA-mhc6-2gfq-xx62 is a critical-severity (CVSS 9.6) CWE-95 vulnerability in github.com/rancher/rancher. O3 Security confirms whether GHSA-mhc6-2gfq-xx62 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Rancher vulnerable to command injection through unsanitized YAML parameter
Real-World Exposure
github.com/rancher/rancher🐹github.com/rancher/rancher🐹github.com/rancher/rancher🐹github.com/rancher/rancher🐹github.com/rancher/rancher🐹github.com/rancher/rancherReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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 applyagainst 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: trueenabled. - Uses the
cattleservice account, which possessescluster-adminprivileges. - Mounts
/etc/kubernetesdirectly 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 with elevated privileges.
- Access sensitive cluster secrets and configurations via the privileged service account.
- Disrupt cluster operations by manipulating critical control-plane workloads.
- Establish persistent access through the deployed DaemonSet.
Note: If you believe that you might have been impacted by this vulnerability, it's highly advised to review your clusters' logs and deployment logs for signs of malicious deployments and to rotate all service accounts and credentials that might have been exposed in such a scenario.
Please refer to the associated MITRE ATT&CK - Technique - Deploy Container for further information about this category of attack.
Patches
This vulnerability is addressed by validating the authImage parameter to ensure it contains only valid OCI image reference characters, rejecting any input containing newlines, whitespace, or other characters that could break YAML syntax.
Patched versions of Rancher include release v2.14.2, v2.13.6, v2.12.10, v2.11.14 and v2.10.12.
Workarounds
If upgrading to a patched version immediately is not feasible, users are encouraged to apply the following workaround:
- Review the
kube-api-authDaemonSet: Inspect downstream clusters for thekube-api-authDaemonSet within thecattle-systemnamespace (which targets control-plane nodes). Review this resource configuration carefully for:- Unexpected
command:orargs:fields in the container specification. - References to non-standard or suspicious container images.
- Any modifications occurring after the initial cluster import.
- Unexpected
- Validate manifest integrity: Before running
kubectl applyon any import manifests, verify that the source URLs originate from trusted sources and match expected patterns.
Credits
This security issue was reported by the following collaborators according to our responsible disclosure policy:
- Radisauskas Arnoldas from NATO and the NATO Cyber Security Centre (NCSC).
- Michael Wollner from Deutsche Telekom AG.
References
If you have any questions or comments about this advisory:
- Reach out to the SUSE Rancher Security team for security related inquiries.
- Open an issue in the Rancher repository.
- Verify with our support matrix and product support lifecycle.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/rancher/rancher | ≥ 2.14.0&&< 2.14.2 | 2.14.2 |
| 🐹Go | github.com/rancher/rancher | ≥ 2.13.0&&< 2.13.6 | 2.13.6 |
| 🐹Go | github.com/rancher/rancher | ≥ 2.12.0&&< 2.12.10 | 2.12.10 |
| 🐹Go | github.com/rancher/rancher | ≥ 2.11.0&&< 2.11.14 | 2.11.14 |
| 🐹Go | github.com/rancher/rancher | ≥ 2.10.0&&< 2.10.12 | 2.10.12 |
| 🐹Go | github.com/rancher/rancher | all versions | 0.0.0-20260617231817-2aa77eb283e7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rancher/rancher. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/rancher/rancher to 2.14.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mhc6-2gfq-xx62 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-mhc6-2gfq-xx62 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-mhc6-2gfq-xx62. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-mhc6-2gfq-xx62 in your dependencies?
O3 detects GHSA-mhc6-2gfq-xx62 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.