Loading...
Skip to main content

CVE-2022-45157 — Vulnerability in github.com/rancher/rancher — CVE...

HIGH

Exposure of vSphere's CPI and CSI credentials in Rancher

Published October 25, 2024Updated September 10, 2026Source: osv

Summary

### Impact A vulnerability has been identified in the way that Rancher stores vSphere's CPI (Cloud Provider Interface) and CSI (Container Storage Interface) credentials used to deploy clusters through the vSphere cloud provider. This issue leads to the vSphere CPI and CSI passwords being stored in a plaintext object inside Rancher. This vulnerability is only applicable to users that deploy clusters in vSphere environments. The exposed passwords were accessible in the following objects: - Can be accessed by users that are cluster members of the provisioned clusters: - When provisioning a new cluster with the vSphere cloud provider through Rancher's UI (user interface), Cluster Templates and Terraform on the object `provisioning.cattle.io` in `spec.rkeConfig.chartValues.rancher-vsphere-cpi` and `spec.rkeConfig.chartValues.rancher-vsphere-csi`. - On the object `rke.cattle.io.rkecontrolplane` in `spec.chartValues.rancher-vsphere-cpi` and `spec.chartValues.rancher-vsphere-csi`. - Can be accessed by users with privileged access to the clusters' infrastructure (host OS): - Inside the `plan` files in the provisioned downstream clusters' filesystems. **Note:** if you believe that the vSphere credentials might have been accessed by unauthorized users, it's highly recommended to change them, after updating Rancher to a patched version. Please consult the associated [MITRE ATT&CK - Technique - Credential Access](https://attack.mitre.org/tactics/TA0006/) for further information about this category of attack. ### Patches Patched versions include Rancher releases **2.8.9 and 2.9.3**. After updating your environment to one of the patched Rancher's versions, it's mandatory to execute [this script](https://github.com/rancherlabs/support-tools/tree/master/migrate-vsphere-clusters) that provides an automated way to mitigate any vulnerable leftover vSphere clusters' credentials within Rancher's local cluster. This script doesn't need to be executed in case you are installing a fresh and new environment. The script will fetch all objects in Rancher's local cluster, loops through them, if the affected vSphere charts are present, then it extracts the `username` and `password` parameters into a secret in the `fleet-default` namespace for both with the appropriate annotation to synchronize them to the downstream clusters. Finally, it updates the cluster's `chartValues` to reference those secrets rather than existing plaintext values. The script confirms on write operations, as well as backs up configurations of the cluster objects before operating so rolling back is simple. To run the script, fetch the `kubeconfig` for your local cluster and run with `KUBECONFIG=/path/to/kubeconfig.yml bash migrate.sh`. The script is idempotent and can be run multiple times safely if you want to validate just one at a time. **Notes:** - The [feature flag](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/installation-references/feature-flags) `provisioningprebootstrap` must be enabled after updating to one of the patched versions. This feature flag is also mandatory when installing a new cluster. - **Rancher 2.7 release line is not receiving a backport security patch for this vulnerability.** For users running Rancher 2.7 with vSphere provisioning and that are concerned with this security issue, the recommendation is to update Rancher to one of the patched versions by following the standard update procedure based on the 2.7 version that is being used. Refer to the release notes for the proper update process for [2.8.9](https://github.com/rancher/rancher/releases/tag/v2.8.9) and [2.9.3](https://github.com/rancher/rancher/releases/tag/v2.9.3). ### Workarounds Besides only granting access to Rancher to trusted users and not allowing direct access to untrusted users to the clusters' infrastructure, there is no direct workaround for this security issue, except updating Rancher to one of the patched versions. ### References If you have any questions or comments about this advisory: - Reach out to the [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries. - Open an issue in the [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository. - Verify with our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).

Advisory Timeline

  • First published October 25, 2024 (717 days ago).
  • Last revised September 10, 2026 — 684 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/rancher/rancher to 2.9.3 or later
go get github.com/rancher/rancher@v2.9.3
Go
Update github.com/rancher/rancher to 2.8.9 or later
go get github.com/rancher/rancher@v2.8.9

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/rancher/rancher
go
All versions2.9.3
github.com/rancher/rancher
go
All versions2.8.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L

Frequently Asked Questions

What is CVE-2022-45157?
Exposure of vSphere's CPI and CSI credentials in Rancher This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2022-45157?
CVE-2022-45157 affects github.com/rancher/rancher. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-45157 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-xj7w-r753-vj8v
GO-2024-3223

Related CVEs

  • CVE-2022-31247
    CRITICAL

    Rancher has downstream cluster privilege escalation through cluster and project role template binding (CRTB/PRTB)

  • CVE-2023-32196
    CRITICAL

    Rancher allows privilege escalation in Windows nodes due to Insecure Access Control Lists

  • CVE-2025-23391
    CRITICAL

    Rancher: Restricted Administrator can change Administrator's passwords

  • CVE-2021-36783
    CRITICAL

    Rancher doesn't properly sanitize credentials in cluster template answers

  • CVE-2021-36782
    CRITICAL

    Rancher API and cluster.management.cattle.io object vulnerable to plaintext storage and exposure of credentials

  • CVE-2021-25320
    CRITICAL

    Rancher cloud credentials can be used through proxy API by users without access

  • CVE-2024-22031
    HIGH

    Rancher users who can create Projects can gain access to arbitrary projects

  • CVE-2023-22650
    HIGH

    Rancher does not automatically clean up a user deleted or disabled from the configured Authentication Provider

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies