Skip to content

Privilege escalation for users with create/update permissions in Global Roles in Rancher

Moderate severity GitHub Reviewed Published Apr 15, 2022 in rancher/rancher • Updated Feb 1, 2023

Package

gomod github.com/rancher/rancher (Go)

Affected versions

>= 2.6.0, < 2.6.4
>= 2.5.0, < 2.5.13

Patched versions

2.6.4
2.5.13

Description

Impact

This vulnerability affects customers who utilize non-admin users that are able to create or edit Global Roles. The most common use case for this scenario is the restricted-admin role.

A flaw was discovered in Rancher versions from 2.5.0 up to and including 2.5.12 and from 2.6.0 up to and including 2.6.3 which allows users who have create or update permissions on Global Roles to escalate their permissions, or those of another user, to admin-level permissions. Global Roles grant users Rancher-wide permissions, such as the ability to create clusters. In the identified versions of Rancher, when users are given permission to edit or create Global Roles, they are not restricted to only granting permissions which they already posses.

The privilege escalation can be taken advantage of in two ways by users with create or update permissions on Global Roles (including the restricted-admin):

  1. Editing the global admin role to make it the default for new users, then creating a new user that will be elevated to the global admin role.
  2. Creating a new global role with permissions already possessed by the restricted-admin, assigning this new role to a user, then modifying the global role to grant additional administrive like permissions ('*') to the elevated user.

Patches

Patched versions include releases 2.5.13, 2.6.4 and later versions.

Workarounds

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

Note: If you have users who have create or edit permissions on Global Roles but are not admin users (for example, the restricted-admin), it is highly advised to review the roles and users created by those users for possible privilege escalations.

For more information

If you have any questions or comments about this advisory:

References

@macedogm macedogm published to rancher/rancher Apr 15, 2022
Published by the National Vulnerability Database May 2, 2022
Published to the GitHub Advisory Database May 2, 2022
Reviewed May 2, 2022
Last updated Feb 1, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H

EPSS score

0.087%
(38th percentile)

CVE ID

CVE-2021-36784

GHSA ID

GHSA-jwvr-vv7p-gpwq

Source code

github.com/rancher/rancher
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.