GHSA-8h6m-wv39-239m CVE-2024-22031 GO-2025-3647
Rancher users who can create Projects can gain access to arbitrary projects
- Severity
- 8.5 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.43%
- Chance of exploitation in the next 30 days. Higher than 37.78% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-863 Incorrect Authorization
- Fix
2.9.9- Upgrade github.com/rancher/rancher to this version or later
Description
Impact
A vulnerability has been identified within Rancher where a user with the ability to create a project, on a certain cluster, can create a project with the same name as an existing project in a different cluster. This results in the user gaining access to the other project in the different cluster, resulting in a privilege escalation. This happens because the namespace used on the local cluster to store related resources (PRTBs and secrets) is the name of the project.
Please consult the associated MITRE ATT&CK - Technique - Privilege Escalation for further information about this category of attack.
Patches
Patched versions include releases v2.11.1, v2.10.5, v2.9.9.
The fix involves the following changes:
Rancher:
- Instead of using the project name as the namespace, Rancher will instead be using a new field on the project spec called backingNamespace. If that field exists, use that for the project namespace going forward. However, if the project does not have that field filled out (likely because it existed before this change), Rancher will continue using the name for the namespace.
Rancher Webhook:
- New mutation on create
project.Status.BackingNamespaceto beSafeConcatName(project.Spec.ClusterName, project.Name); - Generate the name manually within the mutating webhook, because normally, name generation happens after the mutating webhooks;
- Removed a validation where
projectNameandNamespacehad to be the same for PRTBs, since PRTBs now go inproject.BackingNamespace; - On update, if
BackingNamespaceisn't set, set it toproject.Name. For existing objects after update this will help unify them to the new projects. - The
BackingNamespacecan't be edited after it's set.
Note: Rancher v2.8 release line does not have the fix for this CVE. The fix for v2.8 was considered too complex and with the risk of introducing instabilities right before this version goes into end-of-life (EOL), as documented in SUSE’s Product Support Lifecycle page. Please see the section below for workarounds or consider upgrading to a newer and patched version of Rancher.
Workarounds
If you can't upgrade to a fixed version, please make sure that:
- Users are not allowed to create projects with the same object names from another cluster.
To identify if this security issue could have been abused within your system, you need to find if there are any projects with the same name but on different clusters. To do that, run the following command in the local cluster as an administrator:
kubectl get projects -A -o=custom-columns='NAME:metadata.name' | sort | uniq -c
That command will list all project names, and show the instances of each name. Any project with more than 1 instance is affected by this security issue. To remedy the situation, the projects will need to be deleted and re-created to ensure no namespace collisions happen. While it would be possible to delete all but 1 of the projects with the same name, this is unadvisable because a user could have given themselves access to the wrong project.
References
If you have any questions or comments about this advisory:
- Reach out to the SUSE Rancher Security team for security related inquiries.
- Open an issue in the Rancher repository.
- Verify with our support matrix and product support lifecycle.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/rancher/rancher | >= 2.8.0, < 2.9.9 |
2.9.9 |
| github.com/rancher/rancher | >= 2.10.0, < 2.10.5 |
2.10.5 |
| github.com/rancher/rancher | >= 2.11.0, < 2.11.1 |
2.11.1 |
| github.com/rancher/rancher | all versions |
No fix yet |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/rancher/rancher Go → 2.9.9
- go
go get github.com/rancher/rancher@v2.9.9 && go mod tidy
Severity breakdown
CVSS 3.1 8.5
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-863: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Packages
Other links
- github.com/rancher/rancher/security/advisories/GHSA-8h6m-wv39-239m
- github.com/rancher/rancher/commit/7f16b596120dd382ce6e9ed0baf83bc23f633054
- github.com/rancher/rancher/commit/9c1d1c2bfcba36ae4f06c1fd043eb539ad801d4d
- github.com/rancher/rancher/commit/b0be28f86fc556414bd9b323f05b2b4bf8317c2d
- github.com/rancher/rancher/commit/f036e8b6ab726c3abbc03bbf7c8d0d53373c84e5
- pkg.go.dev/vuln/GO-2025-3647
- bugzilla.suse.com/show_bug.cgi
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-4j6x-2764-m8gh Rancher has over-inclusive team membership expansion in GitHub App authentication provider | High | Also affects github.com/rancher/rancher |
| GHSA-vx8h-4prv-g744 Rancher has Privilege Escalation from Project Owner to Host | High | Also affects github.com/rancher/rancher |
| GHSA-mhc6-2gfq-xx62 Rancher vulnerable to command injection through unsanitized YAML parameter | Critical | Also affects github.com/rancher/rancher |
| GHSA-5v3h-x4wf-5c35 Rancher Extensions have arbitrary file access via path traversal | High | Also affects github.com/rancher/rancher |
| GHSA-gqf8-rvrh-g7w6 Rancher cloud credentials can be used through proxy API by users without access | Critical | Also affects github.com/rancher/rancher |
| GHSA-hwm2-4ph6-w6m5 Rancher's restricted PodSecurityPolicy does not prevent containers from running as a privileged user | High | Also affects github.com/rancher/rancher |
| GHSA-mc24-7m59-4q5p Rancher CLI skips TLS verification on Rancher CLI login command | Medium | Also affects github.com/rancher/rancher |
| GHSA-mw39-9qc2-f7mg Rancher exposes sensitive information through audit logs | Medium | Also affects github.com/rancher/rancher |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor