CVE-2021-36784: Github.com/rancher/rancher Privilege Escalation For Users With Vulnerability
MODERATECVE-2021-36784 is a MODERATE (CVSS 6.5) privilege escalation for users with vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves privilege escalation for users with create/update permissions in global roles in rancher. Remediation is available by upgrading affected packages to version 2.6.4, 2.5.13.
CVE-2021-36784 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H).
How to Fix CVE-2021-36784
To remediate this vulnerability, upgrade all affected Github.com/rancher/rancher dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/rancher/rancher to 2.6.4
Upgrade github.com/rancher/rancher to 2.5.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/rancher/rancher
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-36784, inspect your project dependencies for Github.com/rancher/rancher:
inspect dependencies for github.com/rancher/rancher
Analyze the terminal output to locate any version of Github.com/rancher/rancher in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Github.com/rancher/rancher, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-36784 Affected Github.com/rancher/rancher Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/rancher/rancher
|
Go |
≥ 2.6.0
< 2.6.4
|
2.6.4
|
|
github.com/rancher/rancher
|
Go |
≥ 2.5.0
< 2.5.13
|
2.5.13
|
References
Frequently Asked Questions
What is CVE-2021-36784?
Which Github.com/rancher/rancher versions are affected?
What version fixes CVE-2021-36784?
Is github.com/rancher/rancher affected?
What is the CVSS score of CVE-2021-36784?
What CWE is associated with CVE-2021-36784?
How can I check Go dependencies for CVE-2021-36784?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jwvr-vv7p-gpwq",
"modified" : "2022-05-02T19:39:35Z",
"published" : "2022-05-02T19:39:35Z",
"aliases" : [ "CVE-2021-36784" ],
"summary" : "Privilege escalation for users with create/update permissions in Global Roles in Rancher",
"details" : "### Impact\nThis vulnerability affects customers who utilize non-admin users that are able to create or edit [Global Roles](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rbac/). The most common use case for this scenario is the [`restricted-admin`](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rbac/global-permissions/#restricted-admin) role.\n\nA 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.\n\nThe privilege escalation can be taken advantage of in two ways by users with create or update permissions on Global Roles (including the `restricted-admin`):\n\n1. 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.\n2. 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.\n\n### Patches\nPatched versions include releases 2.5.13, 2.6.4 and later versions.\n\n### Workarounds\nLimit access in Rancher to trusted users. There is not a direct mitigation besides upgrading to the patched Rancher versions.\n\n**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.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Reach out to [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries.\n* Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository.\n* Verify our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.6.0"
}, {
"fixed" : "2.6.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/security/advisories/GHSA-jwvr-vv7p-gpwq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-36784"
}, {
"type" : "WEB",
"url" : "https://bugzilla.suse.com/show_bug.cgi?id=1193991"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/releases/tag/v2.5.13"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/releases/tag/v2.6.4"
}, {
"type" : "PACKAGE",
"url" : "github.com/rancher/rancher"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269", "CWE-285" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-05-02T19:39:35Z",
"nvd_published_at" : "2022-05-02T12:16:00Z"
}
}