Summary
Rancher Manager's GlobalRole controller can use a user-controlled annotation to select an existing Kubernetes ClusterRole and overwrite its permission rules without confirming ownership. A user permitted to create or update delegated GlobalRoles may therefore disrupt authorization for principals bound to roles such as cluster-admin, with the effect persisting after the malicious GlobalRole is removed.
Affected context
The issue occurs in Rancher Manager deployments where the GlobalRole controller processes the authz.management.cattle.io/cr-name annotation and where a user has delegated permission to create or update GlobalRoles. Risk is present when the controller accepts a referenced ClusterRole without verifying that the GlobalRole owns or is authorized to manage it. The reported affected range is Rancher Manager versions before 2.15.1.
Exploit preconditions
- Attack surface: Rancher GlobalRole management and the controller's ClusterRole reconciliation path
- Required access: Permission to create or update a delegated GlobalRole
- Trigger point: GlobalRole reconciliation after processing the user-settable
authz.management.cattle.io/cr-nameannotation - Why exploitation is possible: The controller derives a target ClusterRole name from attacker-influenced input and overwrites its rules without an effective ownership or authorization check
Why this happens
The underlying bug is authorization through a user-controlled object reference. The controller treats the annotation value as sufficient authority to select a ClusterRole, rather than independently verifying that the referenced object is within the GlobalRole's permitted management scope. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because attacker-influenced naming determines which security-sensitive object is modified.
Potential impact
- An attacker may revoke or alter permissions for principals bound to the targeted ClusterRole.
- The change could disrupt administrative and workload operations across affected clusters.
- Authorization failures may persist after the malicious GlobalRole is deleted.
- Recovery could require restoration of trusted RBAC rules and review of related access assignments.
General mitigation guidance
Mitigation generally focuses on enforcing ownership-aware authorization before any RBAC object is selected or modified.
Defensive patterns include:
- Treating annotation values and object names as untrusted references rather than authorization decisions.
- Verifying controller ownership, namespace or scope boundaries, and permitted object relationships before applying changes.
- Allowing reconciliation to modify only explicitly managed ClusterRoles, preferably identified through controller-owned metadata rather than user-selected names.
- Applying least privilege to delegated GlobalRole management and separating role delegation from cluster-wide RBAC administration.
- Preserving trusted RBAC state and using controlled, auditable recovery workflows for security-sensitive permission changes.
- Enforcing admission and policy controls that restrict unauthorized ClusterRole mutations.
How teams detect issues like this
Detection can combine controller-focused code review, runtime audit analysis, and policy enforcement.
- Static analysis can flag security-sensitive object lookups whose names originate from annotations, labels, request fields, or other user-controlled keys.
- Code review should examine whether ownership, scope, and authorization are independently validated before RBAC objects are updated.
- Kubernetes audit logs can be monitored for unexpected ClusterRole rule modifications, especially changes initiated through GlobalRole reconciliation.
- Policy controls can alert on or deny ClusterRole updates by identities that are not approved RBAC administrators or owning controllers.
- Automated security review tools may help identify user-controlled references used in privileged object mutation paths.

