CVE-2024-22031: Github.com/rancher/rancher Rancher Users Who Can Create Vulnerability
HIGHCVE-2024-22031 is a HIGH (CVSS 8.5) rancher users who can create vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves rancher users who can create projects can gain access to arbitrary projects. Remediation is available by upgrading affected packages to version 2.9.9, 2.10.5, 2.11.1.
CVE-2024-22031 at a Glance
Security Impact
CVSS: 8.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2024-22031
To remediate this vulnerability, upgrade all affected Github.com/rancher/rancher dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/rancher/rancher to 2.9.9
Upgrade github.com/rancher/rancher to 2.10.5
Upgrade github.com/rancher/rancher to 2.11.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/rancher/rancher
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-22031, inspect your project dependencies for Github.com/rancher/rancher:
inspect dependencies for github.com/rancher/rancher
Analyze the terminal output to locate any version of Github.com/rancher/rancher in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.9), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where 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. In Github.com/rancher/rancher, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-22031 Affected Github.com/rancher/rancher Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/rancher/rancher
|
Go |
≥ 2.8.0
< 2.9.9
|
2.9.9
|
|
github.com/rancher/rancher
|
Go |
≥ 2.10.0
< 2.10.5
|
2.10.5
|
|
github.com/rancher/rancher
|
Go |
≥ 2.11.0
< 2.11.1
|
2.11.1
|
References
Frequently Asked Questions
What is CVE-2024-22031?
Which Github.com/rancher/rancher versions are affected?
What version fixes CVE-2024-22031?
Is github.com/rancher/rancher affected?
What is the CVSS score of CVE-2024-22031?
What CWE is associated with CVE-2024-22031?
How can I check Go dependencies for CVE-2024-22031?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8h6m-wv39-239m",
"modified" : "2025-05-23T18:36:19Z",
"published" : "2025-04-25T15:09:26Z",
"aliases" : [ "CVE-2024-22031" ],
"summary" : "Rancher users who can create Projects can gain access to arbitrary projects",
"details" : "### Impact\nA 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.\n\nPlease consult the associated [MITRE ATT&CK - Technique - Privilege Escalation](https://attack.mitre.org/tactics/TA0004/) for further information about this category of attack.\n\n### Patches\nPatched versions include releases `v2.11.1`, `v2.10.5`, `v2.9.9`.\n\nThe fix involves the following changes:\n\n**Rancher:**\n- 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.\n\n**Rancher Webhook:**\n- New mutation on create `project.Status.BackingNamespace` to be `SafeConcatName(project.Spec.ClusterName, project.Name)`;\n- Generate the name manually within the mutating webhook, because normally, name generation happens after the mutating webhooks;\n- Removed a validation where `projectName` and `Namespace` had to be the same for PRTBs, since PRTBs now go in `project.BackingNamespace`;\n- 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.\n- The `BackingNamespace` can't be edited after it's set.\n\n**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](https://www.suse.com/lifecycle/#suse-rancher-prime) page. Please see the section below for workarounds or consider upgrading to a newer and patched version of Rancher.**\n\n### Workarounds\nIf you can't upgrade to a fixed version, please make sure that:\n- Users are not allowed to create projects with the same object names from another cluster.\n\nTo 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:\n```\nkubectl get projects -A -o=custom-columns='NAME:metadata.name' | sort | uniq -c\n```\n\nThat 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.\n\n### References\nIf you have any questions or comments about this advisory:\n- Reach out to the [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries.\n- Open an issue in the [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository.\n- Verify with our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.9.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.10.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.11.0"
}, {
"fixed" : "2.11.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/security/advisories/GHSA-8h6m-wv39-239m"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/commit/7f16b596120dd382ce6e9ed0baf83bc23f633054"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/commit/9c1d1c2bfcba36ae4f06c1fd043eb539ad801d4d"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/commit/b0be28f86fc556414bd9b323f05b2b4bf8317c2d"
}, {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/commit/f036e8b6ab726c3abbc03bbf7c8d0d53373c84e5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rancher/rancher"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3647"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-25T15:09:26Z",
"nvd_published_at" : null
}
}