CVE-2023-22650: Github.com/rancher/rancher Rancher Does Not Automatically Clean Vulnerability
HIGHCVE-2023-22650 is a HIGH (CVSS 8.8) rancher does not automatically clean vulnerability (CWE-613: Insufficient Session Expiration) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves rancher does not automatically clean up a user deleted or disabled from the configured authentication provider. Remediation is available by upgrading affected packages to version 2.7.14, 2.8.5.
CVE-2023-22650 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-22650
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.7.14
Upgrade github.com/rancher/rancher to 2.8.5
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-2023-22650, 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.7.14), 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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". 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-2023-22650 Affected Github.com/rancher/rancher Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/rancher/rancher
|
Go |
≥ 2.7.0
< 2.7.14
|
2.7.14
|
|
github.com/rancher/rancher
|
Go |
≥ 2.8.0
< 2.8.5
|
2.8.5
|
References
Frequently Asked Questions
What is CVE-2023-22650?
Which Github.com/rancher/rancher versions are affected?
What version fixes CVE-2023-22650?
Is github.com/rancher/rancher affected?
What is the CVSS score of CVE-2023-22650?
What CWE is associated with CVE-2023-22650?
How can I check Go dependencies for CVE-2023-22650?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9ghh-mmcq-8phc",
"modified" : "2024-10-16T19:26:09Z",
"published" : "2024-06-17T22:30:46Z",
"aliases" : [ "CVE-2023-22650" ],
"summary" : "Rancher does not automatically clean up a user deleted or disabled from the configured Authentication Provider",
"details" : "### Impact\n\nA vulnerability has been identified in which Rancher does not automatically clean up a user which has been deleted from the configured authentication provider (AP). This characteristic also applies to disabled or revoked users, Rancher will not reflect these modifications which may leave the user’s tokens still usable.\n\nAn AP must be enabled to be affected by this, as the built-in User Management feature is not affected by this vulnerability.\nThis issue may lead to an adversary gaining unauthorized access, as the user’s access privileges may still be active within Rancher even though they are no longer valid on the configured AP (please consult the [MITRE ATT&CK - Technique - Valid Accounts](https://attack.mitre.org/techniques/T1078/) for further information about the associated technique of attack).\n\nIt’s important to note that all configurable APs are impacted, see [Rancher Docs - Configuring Authentication - External vs. Local Authentication](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config#external-vs-local-authentication) to get the full authentication providers list.\n\n\nTo address this issue, the fix introduces a new user retention process that can be configured to run periodically and disable and/or delete inactive users. If enabled a user becomes subject to retention if they don't login for a configurable period of time. It's possible to set overrides for users that are used mainly for programmatic access (e.g. CI, scripts etc.) so that they don't become subject to retention for a longer period of time or at all. The user retention process is disabled by default, to avoid deleting wrong accounts. It is up to each user to enable it and configure the retention period as it best suits its environment.\n\nBe aware that once the process is enabled, it might take a few days for previous users that have been revoked or deleted from the AP to be automatically removed from Rancher. To attenuate the risk of this condition, we recommend to regularly audit the AP’s user accounts for activity and manually deactivate or remove them from Rancher, if they are no longer needed.\n\nFor further information about the user retention process configuration, please refer to the dedicated documentation [Rancher Docs - Advanced User Guides - Enable User Retention](https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-user-retention).\n\n### Patches\n\nPatched versions include releases `2.7.14` and `2.8.5`.\n\n### Workarounds\n\nAdministrators that are unable to update to a patched Rancher Manager version, are advised to delete Rancher users, via kubectl or through the UI, as soon as those users are deleted from the Authentication Provider. If a user needs to be temporarily disabled on the Authentication Provider, similar intervention will need to take place to reflect that change on Rancher Manager.\n\n\nBelow is a procedure to list and remove a deleted/disabled user in Rancher using `kubectl` (with a privileged kubeconfig).\n\n1. List all users bound to a supported external auth provider, then returns `username`, `uid`, `displayName` and `PrincipalIds` which contains the related `authprovider_user://ID`\n\n```shell\n#!/bin/bash\n\nfor authprovider in {activedirectory,azure,common,genericoidc,github googleauth, keycloakoidc,ldap,oidc,publicapi,saml}\ndo \n\tkubectl get users -o json | jq --arg authprovider \"$authprovider\" '.items[] | select(.principalIds[] | test(\"^\" + $authprovider + \"_user://\")) | {username: .metadata.name, uid: .metadata.uid, displayName: .displayName, principalIds: .principalIds}'\ndone\n```\n\n2. Once the `authprovider_user://ID` (and/or `DisplayName`) is confirmed, remove the user from the Rancher UI or using `kubectl delete users <USERNAME>`.\n\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\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/).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.7.0"
}, {
"fixed" : "2.7.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.8.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/security/advisories/GHSA-9ghh-mmcq-8phc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22650"
}, {
"type" : "WEB",
"url" : "https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-22650"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rancher/rancher"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-306", "CWE-613" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-17T22:30:46Z",
"nvd_published_at" : "2024-10-16T09:15:02Z"
}
}