Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/rancher/rancher
  4. ›
  5. CVE-2022-31247

CVE-2022-31247: Rancher has downstream cluster privilege escalation through cluster and project role template binding (CRTB/PRTB)

March 3, 2026

An issue was discovered in Rancher versions up to and including 2.5.15 and 2.6.6 where a flaw with authorization logic allows privilege escalation through cluster role template binding (CRTB) and project role template binding (PRTB). This issue does not affect the local cluster, it affects only downstream clusters.

The vulnerability can be exploited by any user who has permissions to create/edit cluster role template bindings or project role template bindings (such as cluster-owner, manage cluster members, project-owner and manage project members) to gain owner permission in another project in the same cluster or in another project on a different downstream cluster.

  • The user must have kubectl access in the local cluster to exploit this scenario.

  • This can only be abused to gain cluster-owner permission on a different downstream cluster if the user is already cluster-owner on at least one downstream cluster.

  • Example of a modified CRTB (note: the clusterName points to the cluster ID of the cluster that the privileges will be escalated and namespace points to the current cluster ID that the user has permissions):

kubectl edit clusterroletemplatebindings crtb-<crtb-ID> -n c-<cluster-ID>
---
apiVersion: management.cattle.io/v3
clusterName: <ID-of-the-cluster-to-escalate>
kind: ClusterRoleTemplateBinding
metadata:
annotations:
<omitted>
finalizers:
- <omitted>
generateName: crtb-
labels:
<omitted>
cattle.io/creator: norman
name: crtb-<crtb-ID>
namespace: c-<current-cluster-ID>
roleTemplateName: cluster-owner
userName: u-<user-ID>
userPrincipalName: local://u-<user-ID>

An artifact to flag the exploitation of this issue is that the namespace of the CRTB/PRTB will not match the cluster name (clusterName) of the CRTB/PRTB. For example, every CRTB in the c-123xyz namespace should have a cluster name of c-123xyz. If instead, the cluster name is c-abc567, for example, this is likely a result of a user exploiting this flaw.

References

  • bugzilla.suse.com/show_bug.cgi?id=1199730
  • github.com/advisories/GHSA-6x34-89p7-95wg
  • github.com/rancher/rancher
  • github.com/rancher/rancher/security/advisories/GHSA-6x34-89p7-95wg
  • nvd.nist.gov/vuln/detail/CVE-2022-31247

Code Behaviors & Features

Detect and mitigate CVE-2022-31247 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.5.0 before 2.5.16, all versions starting from 2.6.0 before 2.6.7

Fixed versions

  • 2.5.16
  • 2.6.7

Solution

Upgrade to versions 2.5.16, 2.6.7 or above.

Impact 9.1 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-285: Improper Authorization
  • CWE-863: Incorrect Authorization

Source file

go/github.com/rancher/rancher/CVE-2022-31247.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 15 May 2026 00:21:49 +0000.