CVE-2024-22031
JSON

8.5high

Rancher users who can create Projects can gain access to arbitrary projects

Severity
8.5high CVSS:3.1 by suse
Exploit likelihood
0.43% (higher than 39% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
suse
Also known as
GHSA-8h6m-wv39-239mGO-2025-3647

Description

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.

Affected

Product or packageVersionsReported by
github.com/rancher/rancherfrom 2.8.0 before 2.9.9, from 2.10.0 before 2.10.5, from 2.11.0 before 2.11.1CVE List
github.com/rancher/rancher (Go)from 2.8.0 before 2.9.9, from 2.10.0 before 2.10.5, from 2.11.0 before 2.11.1, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

suse8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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.BackingNamespace to be SafeConcatName(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 projectName and Namespace had to be the same for PRTBs, since PRTBs now go in project.BackingNamespace;
  • On update, if BackingNamespace isn't set, set it to project.Name. For existing objects after update this will help unify them to the new projects.
  • The BackingNamespace can'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:

Go Vulnerability Database

Rancher users who can create Projects can gain access to arbitrary projects in github.com/rancher/rancher.

NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.

(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)

The additional affected modules and versions are: github.com/rancher/rancher from v2.8.0 before v2.9.9, from v2.10.0 before v2.10.5, from v2.11.0 before v2.11.1.

NVD (es)

Se ha identificado una vulnerabilidad en Rancher donde un usuario con la capacidad de crear un proyecto, en un determinado clúster, puede crear un proyecto con el mismo nombre que un proyecto existente en otro clúster. Esto permite que el usuario obtenga acceso al otro proyecto en el clúster diferente, provocando una escalada de privilegios. Esto ocurre porque el namespace utilizado en el clúster local para almacenar los recursos relacionados (PRTBs y secrets) es el nombre del proyecto.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2024-22031 changed 2026-10-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-8h6m-wv39-239m changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3647 changed 2026-07-02CC-BY-4.0
NVDCVE-2024-22031 changed 2026-10-27Public domain