CVE-2022-45157

9.1 CRITICAL

📋 TL;DR

CVE-2022-45157 is a high-severity vulnerability where Rancher stores vSphere CPI and CSI credentials in plaintext objects. This allows attackers with access to Rancher to read sensitive vSphere passwords. Only users who deploy Kubernetes clusters in vSphere environments are affected.

💻 Affected Systems

Products:
  • Rancher
Versions: Rancher versions prior to 2.6.12, 2.7.2
Operating Systems: All platforms running Rancher
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Rancher deployments using vSphere cloud provider for cluster provisioning.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain vSphere administrative credentials, enabling complete compromise of vSphere infrastructure and all managed clusters.

🟠

Likely Case

Attackers with Rancher access extract vSphere credentials to escalate privileges within the vSphere environment.

🟢

If Mitigated

With proper access controls and monitoring, credential exposure is detected before exploitation.

🌐 Internet-Facing: MEDIUM - Rancher management interfaces exposed to internet increase attack surface.
🏢 Internal Only: HIGH - Internal attackers or compromised accounts can easily access plaintext credentials.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to Rancher's API or UI where plaintext credentials are stored.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Rancher 2.6.12, 2.7.2 and later

Vendor Advisory: https://github.com/rancher/rancher/security/advisories/GHSA-xj7w-r753-vj8v

Restart Required: Yes

Instructions:

1. Backup Rancher configuration. 2. Upgrade to Rancher 2.6.12 or 2.7.2+. 3. Restart Rancher services. 4. Rotate all vSphere CPI/CSI credentials.

🔧 Temporary Workarounds

Credential Rotation

all

Rotate vSphere credentials to limit exposure window

# Rotate vSphere credentials through vCenter management

Access Restriction

all

Restrict Rancher access to authorized personnel only

# Implement network segmentation and RBAC controls

🧯 If You Can't Patch

  • Implement strict RBAC to limit who can access Rancher cluster configuration
  • Monitor Rancher API access logs for credential extraction attempts

🔍 How to Verify

Check if Vulnerable:

Check Rancher version: if using vSphere provider and version <2.6.12 or <2.7.2, you are vulnerable.

Check Version:

kubectl get pods -n cattle-system -l app=rancher -o jsonpath='{.items[0].spec.containers[0].image}' | grep -o 'rancher/rancher:[^ ]*'

Verify Fix Applied:

Confirm Rancher version is 2.6.12+ or 2.7.2+ and verify vSphere credentials are no longer stored in plaintext objects.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized access to Rancher API endpoints related to cloud credentials
  • Multiple failed authentication attempts followed by credential access

Network Indicators:

  • Unusual outbound connections from Rancher to vSphere infrastructure

SIEM Query:

source="rancher" AND ("cloudcredential" OR "vsphere" OR "cpi" OR "csi") AND ("GET" OR "POST")

🔗 References

📤 Share & Export