Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2022-31247 — rancher

🔴 CVSS 9.5 — Critical ✅ No Known Exploit CWE-285 NVD
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

Impact

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.

For more information about cluster and project roles, please consult Rancher's [documentation](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rbac/cluster-project-roles/).

Patches

Patched versions include releases 2.5.16, 2.6.7 and later versions.

Workarounds

Limit access in Rancher to trusted users. There is not a direct mitigation besides upgrading to the patched Rancher versions.

Important:

  • It is highly advised to check the local and downstream clusters for potential unrecognized CRTBs (kubectl get clusterroletemplatebindings -A) and PRTBs (kubectl get projectroletemplatebindings -A) assignments.
  • The ability to add other users to projects and clusters is a highly-privileged permission which may result in users being able to operate beyond their explicitly specified RBAC. It is recommended that this permission be granted selectively.

The following script can be used as a helper to detect possible deviations of CRTBs and PRTBs that do not match the expected value. Further investigation is required to determine if the flagged objects were maliciously modified or not. The script requires kubectl access to the local cluster and the jq command.

```shell

#!/usr/bin/env bash

echo "CRTBs that don't match cluster:"

kubectl get clusterroletemplatebindings -A -o=jsonpath="{range .items[?(@[email protected])]}{.metadata.name}{'\n'}{end}"

echo "PRTBs that don't match project:"

kubectl get projectroletemplatebindings -A -ojson | jq -r '.items[]|.metadata as $m|select(.projectName|endswith($m.namespace)|not)|.metadata.name'

```

For more information

If you have any questions or comments about this advisory:

  • Reach out to [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries.
  • Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository.
  • Verify our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs administrative privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2022-31247 is classified as CWE-285: Improper Authorization. A request is carried out without confirming that the caller is permitted to perform it on that specific resource.

Affected software

CVE-2022-31247 is recorded against 2 packages.

  • github.com/rancher/rancher
  • rancher (from 2.6.0 up to 2.6.7)

Timeline and source

Published on 3 March 2026 and last revised on 8 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
bugzilla.suse.com (Web)
github.com (Package)

Other advisories for this package

github.com/rancher/rancher has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-285: Improper Authorization) in other software:

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
CWE CWE-285
Public Exploit ✅ No
Source NVD
Published 2026-03-03
Updated 2026-08-20
Modified 2026-07-08
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/rancher/rancher
rancher 2.6.0 2.6.7

Similar Threats

Exploit Protection

Are you running rancher?

CVE-2022-31247 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2022-31247 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2022