MediumGHSA-jwvr-vv7p-gpwqCVE-2021-36784

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

Published 2 May 2022 · Updated 8 Nov 2023

Is your project on an affected github.com/rancher/rancher?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=2.6.0 <2.6.4
Fixed in
2.6.4
Update to the fixed version for your release line, for example:go get github.com/rancher/rancher@v2.6.4
Affected
>=2.5.0 <2.5.13
Fixed in
2.5.13
Update to the fixed version for your release line, for example:go get github.com/rancher/rancher@v2.5.13

Details

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:

Is GHSA-jwvr-vv7p-gpwq in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/rancher/rancher, and gives you the command that fixes it.

More advisories for github.com/rancher/rancher

  • LowCVE-2026-41053Rancher has over-inclusive team membership expansion in GitHub App authentication provider in github.com/rancher/rancher · 7 Jul 2026
  • LowCVE-2026-44939Rancher vulnerable to command injection through unsanitized YAML parameter in github.com/rancher/rancher · 7 Jul 2026
  • LowCVE-2026-41052Rancher has Privilege Escalation from Project Owner to Host in github.com/rancher/rancher · 7 Jul 2026
  • CriticalCVE-2026-41052Rancher has Privilege Escalation from Project Owner to Host · 1 Jul 2026
  • HighCVE-2026-41053Rancher has over-inclusive team membership expansion in GitHub App authentication provider · 1 Jul 2026
  • CriticalCVE-2026-44939Rancher vulnerable to command injection through unsanitized YAML parameter · 1 Jul 2026
All 102 advisories for github.com/rancher/rancher

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.