CVE-2024-22031 — Vulnerability in github.com/rancher/rancher
Rancher users who can create Projects can gain access to arbitrary projects
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.36%). Schedule for your next planned update.
Does your project use an affected github.com/rancher/rancher version?
Paste your go.sum to check it for CVE-2024-22031 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published April 25, 2025 (580 days ago).
- Last revised September 10, 2026 — 503 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/rancher/rancher@v2.11.1
go get github.com/rancher/rancher@v2.10.5
go get github.com/rancher/rancher@v2.9.9
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/rancher/rancher Go · Affected: All versions | 2.11.1 |
| github.com/rancher/rancher Go · Affected: All versions | 2.10.5 |
| github.com/rancher/rancher Go · Affected: All versions | 2.9.9 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-863Incorrect AuthorizationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/rancher/rancher/security/advisories/GHSA-8h6m-wv39-239mWEB
- https://github.com/rancher/rancher/commit/7f16b596120dd382ce6e9ed0baf83bc23f633054WEB
- https://github.com/rancher/rancher/commit/9c1d1c2bfcba36ae4f06c1fd043eb539ad801d4dWEB
- https://github.com/rancher/rancher/commit/b0be28f86fc556414bd9b323f05b2b4bf8317c2dWEB
- https://github.com/rancher/rancher/commit/f036e8b6ab726c3abbc03bbf7c8d0d53373c84e5WEB
- https://github.com/rancher/rancherPACKAGE
- https://pkg.go.dev/vuln/GO-2025-3647WEB
Frequently Asked Questions
- What is CVE-2024-22031?
- Rancher users who can create Projects can gain access to arbitrary projects. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.5/10).
- How do I check if my project is affected by CVE-2024-22031?
- CVE-2024-22031 affects github.com/rancher/rancher. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-22031 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 22.3% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2023-22651CRITICAL
Rancher Webhook is misconfigured during upgrade process
- CVE-2022-31247CRITICAL
Rancher has downstream cluster privilege escalation through cluster and project role template binding (CRTB/PRTB)
- CVE-2023-32196CRITICAL
Rancher allows privilege escalation in Windows nodes due to Insecure Access Control Lists
- CVE-2025-23391CRITICAL
Rancher: Restricted Administrator can change Administrator's passwords
- CVE-2024-52281HIGH
Rancher UI has Stored Cross-site Scripting vulnerability
- CVE-2024-58259HIGH
Rancher affected by unauthenticated Denial of Service
- CVE-2026-41053HIGH
Rancher has over-inclusive team membership expansion in GitHub App authentication provider
- CVE-2026-25705HIGH
Rancher Extensions have arbitrary file access via path traversal