Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2024-22031 — rancher

HIGHFix: rancher/rancher@7f16b59

CVE-2024-22031 is a high-severity (CVSS 8.5) vulnerability in github.com/rancher/rancher. A fix is available for github.com/rancher/rancher — see the affected versions and patch details below.

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

Also known asGO-2025-3647
Published
Apr 25, 2025
Updated
Sep 10, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Sep 10, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

3 pkgs affected
🐹github.com/rancher/rancher🐹github.com/rancher/rancher🐹github.com/rancher/rancher

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

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.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:

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/rancher/rancher≥ 2.8.0&&< 2.9.92.9.9go get github.com/rancher/rancher@v2.9.9
🐹Gogithub.com/rancher/rancher≥ 2.10.0&&< 2.10.52.10.5go get github.com/rancher/rancher@v2.10.5
🐹Gogithub.com/rancher/rancher≥ 2.11.0&&< 2.11.12.11.1go get github.com/rancher/rancher@v2.11.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rancher/rancher, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/rancher/rancher to 2.9.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-22031 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-22031 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2024-22031. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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](https://attack.mitre.org/tactics/TA0
O3 Security · Impact-Aware SCA

Is CVE-2024-22031 in your dependencies?

O3 Security finds CVE-2024-22031 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2024-22031: rancher PrivEsc (High 8.5) | O3 Security