CVE-2021-36782Critical· 9.9▾ AbyssalPoC availableRancher API and cluster.management.cattle.io object vulnerable to plaintext storage and exposure of credentials
▾ Abyssal zone — Critical with a public exploit or in-the-wild use
impact 54.5 · likelihood 0.8 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 2 sources. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Jul 9.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
3.1%
3.1% → 4.2%
1 GitHub repo · Metasploit ×1
An issue was discovered in Rancher versions up to and including 2.5.15 and 2.6.6 where sensitive fields, like passwords, API keys and Rancher's service account token (used to provision clusters), were stored in plaintext directly on Kubernetes objects like Clusters, for example cluster.management.cattle.io. Anyone with read access to those objects in the Kubernetes API could retrieve the plaintext version of those sensitive data.
The exposed credentials are visible in Rancher to authenticated Cluster Owners, Cluster Members, Project Owners, Project Members and User Base on the endpoints:
/v1/management.cattle.io.catalogs/v1/management.cattle.io.cluster/v1/management.cattle.io.clustertemplates/v1/management.cattle.io.notifiers/v1/project.cattle.io.sourcecodeproviderconfig/k8s/clusters/local/apis/management.cattle.io/v3/catalogs/k8s/clusters/local/apis/management.cattle.io/v3/clusters/k8s/clusters/local/apis/management.cattle.io/v3/clustertemplates/k8s/clusters/local/apis/management.cattle.io/v3/notifiers/k8s/clusters/local/apis/project.cattle.io/v3/sourcecodeproviderconfigsSensitive fields are now stripped from Clusters and other objects and moved to a Secret before the object is stored. The Secret is retrieved when the credential is needed. For objects that existed before this security fix, a one-time migration happens on startup.
Important:
serviceAccountToken allows any standard user to escalate its privileges to cluster administrator in Rancher.The fields that have been addressed by this security fix are:
Notifier.SMTPConfig.PasswordNotifier.WechatConfig.SecretNotifier.DingtalkConfig.SecretCatalog.Spec.PasswordSourceCodeProviderConfig.GithubPipelineConfig.ClientSecretSourceCodeProviderConfig.GitlabPipelineConfig.ClientSecretSourceCodeProviderConfig.BitbucketCloudPipelineConfig.ClientSecretSourceCodeProviderConfig.BitbucketServerPipelineConfig.PrivateKeyCluster.Spec.RancherKubernetesEngineConfig.BackupConfig.S3BackupConfig.SecretKeyCluster.Spec.RancherKubernetesEngineConfig.PrivateRegistries.PasswordCluster.Spec.RancherKubernetesEngineConfig.Network.WeaveNetworkProvider.PasswordCluster.Spec.RancherKubernetesEngineConfig.CloudProvider.VsphereCloudProvider.Global.PasswordCluster.Spec.RancherKubernetesEngineConfig.CloudProvider.VsphereCloudProvider.VirtualCenter.PasswordCluster.Spec.RancherKubernetesEngineConfig.CloudProvider.OpenstackCloudProvider.Global.PasswordCluster.Spec.RancherKubernetesEngineConfig.CloudProvider.AzureCloudProvider.AADClientSecretCluster.Spec.RancherKubernetesEngineConfig.CloudProvider.AzureCloudProvider.AADClientCertPasswordCluster.Status.ServiceAccountTokenClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.PrivateRegistries.PasswordClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.Network.WeaveNetworkProvider.PasswordClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.CloudProvider.VsphereCloudProvider.Global.PasswordClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.CloudProvider.VsphereCloudProvider.VirtualCenter.PasswordClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.CloudProvider.OpenstackCloudProvider.Global.PasswordClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.CloudProvider.AzureCloudProvider.AADClientSecretClusterTemplate.Spec.ClusterConfig.RancherKubernetesEngineConfig.CloudProvider.AzureCloudProvider.AADClientCertPasswordPatched versions include releases 2.5.16, 2.6.7 and later versions.
After upgrading to a patched version, it is important to check for the SecretsMigrated condition on Clusters, ClusterTemplates, and Catalogs to confirm when secrets have been fully migrated off of those objects and the objects scoped within them (Notifiers and SourceCodeProviderConfigs).
Limit access in Rancher to trusted users. There is not a direct mitigation besides upgrading to the patched Rancher versions.
Important:
serviceAccountToken. This rotation is not done by the version upgrade. Please see the helper script below.The script available in rancherlabs/support-tools/rotate-tokens repository can be used as a helper to rotate the service account token (used to provision clusters). The script requires a valid Rancher API token, kubectl access to the local cluster and the jq command.
We would like to recognize and appreciate Florian Struck (from Continum AG) and Marco Stuurman (from Shock Media B.V.) for the responsible disclosure of this security issue.
If you have any questions or comments about this advisory:
github.com/rancher/rancher >= 2.5.0, < 2.5.16github.com/rancher/rancher >= 2.6.0, < 2.6.7Upgrade to a patched release:
github.com/rancher/rancher 2.5.16github.com/rancher/rancher 2.6.7Field changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2023-32196Critical· 9.1Rancher allows privilege escalation in Windows nodes due to Insecure Access Control Lists
CVE-2025-23387Medium· 5.3Rancher's SAML-based login via CLI can be denied by unauthenticated users
CVE-2026-25705High· 8.4Rancher Extensions have arbitrary file access via path traversal
CVE-2024-52281High· 8.9Rancher UI has Stored Cross-site Scripting vulnerability
CVE-2021-25320Critical· 9.9Rancher cloud credentials can be used through proxy API by users without access
CVE-2021-36775High· 8.0Rancher's Failure to delete orphaned role bindings does not revoke project level access from group based authentication