CVE-2024-22031

CVE-2024-22031 is a high-severity incorrect authorization vulnerability in github.com/rancher/rancher (go), affecting versions >= 2.8.0, < 2.9.9. It is fixed in 2.9.9, 2.10.5, 2.11.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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:

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.

The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.

CVE-2024-22031 has a CVSS score of 8.5 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.9.9, 2.10.5, 2.11.1); upgrading removes the vulnerable code path.

Affected versions

github.com/rancher/rancher (>= 2.8.0, < 2.9.9) github.com/rancher/rancher (>= 2.10.0, < 2.10.5) github.com/rancher/rancher (>= 2.11.0, < 2.11.1)

Security releases

github.com/rancher/rancher → 2.9.9 (go) github.com/rancher/rancher → 2.10.5 (go) github.com/rancher/rancher → 2.11.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2024-22031? CVE-2024-22031 is a high-severity incorrect authorization vulnerability in github.com/rancher/rancher (go), affecting versions >= 2.8.0, < 2.9.9. It is fixed in 2.9.9, 2.10.5, 2.11.1. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
  2. How severe is CVE-2024-22031? CVE-2024-22031 has a CVSS score of 8.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/rancher/rancher are affected by CVE-2024-22031? github.com/rancher/rancher (go) versions >= 2.8.0, < 2.9.9 is affected.
  4. Is there a fix for CVE-2024-22031? Yes. CVE-2024-22031 is fixed in 2.9.9, 2.10.5, 2.11.1. Upgrade to this version or later.
  5. Is CVE-2024-22031 exploitable, and should I be worried? Whether CVE-2024-22031 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-22031 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-22031?
    • Upgrade github.com/rancher/rancher to 2.9.9 or later
    • Upgrade github.com/rancher/rancher to 2.10.5 or later
    • Upgrade github.com/rancher/rancher to 2.11.1 or later

Other vulnerabilities in github.com/rancher/rancher

Stop the waste.
Protect your environment with Kodem.