CVE-2025-23389: Rancher does not Properly Validate Account Bindings in SAML Authentication Enables User Impersonation on First Login
Impact A vulnerability in Rancher has been discovered, leading to a local user impersonation through SAML Authentication on first login. The issue occurs when a SAML authentication provider (AP) is configured (e.g. Keycloak). A newly created AP user can impersonate any user on Rancher by manipulating cookie values during their initial login to Rancher.
Published Feb 27, 2025 · Updated May 27, 2025
Affected packages
github.com/rancher/rancher
- Ecosystem
- Go
- Affected
- >= 2.8.0, < 2.8.13
- Fixed in
- 2.8.13
- Check
go list -m github.com/rancher/rancher
github.com/rancher/rancher
- Ecosystem
- Go
- Affected
- >= 2.9.0, < 2.9.7
- Fixed in
- 2.9.7
- Check
go list -m github.com/rancher/rancher
github.com/rancher/rancher
- Ecosystem
- Go
- Affected
- >= 2.10.0, < 2.10.3
- Fixed in
- 2.10.3
- Check
go list -m github.com/rancher/rancher
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
A vulnerability in Rancher has been discovered, leading to a local user impersonation through SAML Authentication on first login.
The issue occurs when a SAML authentication provider (AP) is configured (e.g. Keycloak). A newly created AP user can impersonate any user on Rancher by manipulating cookie values during their initial login to Rancher. This vulnerability could also be exploited if a Rancher user (present on the AP) is removed, either manually or automatically via the User Retention feature with delete-inactive-user-after.
More precisely, Rancher validates only a subset of input from the SAML assertion request; however, it trusts and uses values that are not properly validated. An attacker could then configure the saml_Rancher_UserID cookie and the saml_Rancher_Action cookie so that the user principal from the AP will be added to the user specified by the attacker (from saml_Rancher_UserID). Rancher can then be deceived by setting saml_Rancher_UserID to the admin's user ID and saml_Rancher_Action to testAndEnable, thereby executing the vulnerable code path and leading to privilege escalation.
Note that the vulnerability impacts all SAML APs available in Rancher. However the following Rancher deployments are not affected:
- Rancher deployments not using SAML-based AP.
- Rancher deployments using SAML-based AP, where all SAML users are already signed in and linked to a Rancher account.
Please consult the associated MITRE ATT&CK - Technique - Access Token Manipulation: Token Impersonation/Theft for further information about this category of attack.
Patches
This vulnerability is addressed by adding the UserID claim to a JWT signed token, which is protected against tampering.
Patched versions include releases v2.8.13, v2.9.7 and v2.10.3.
Workarounds
Rancher deployments that can't upgrade, could temporarily disable the SAML-based AP as a temporary workaround. However, upgrading is recommended.
References
If you have any questions or comments about this advisory:
- Reach out to the SUSE Rancher Security team for security related inquiries.
- Open an issue in the Rancher repository.
- Verify with our support matrix and product support lifecycle.
Credited to AnonySE26.
References
- https://github.com/rancher/rancher/security/advisories/GHSA-mq23-vvg7-xfm4
- https://pkg.go.dev/vuln/GO-2025-3490
- https://nvd.nist.gov/vuln/detail/CVE-2025-23389
- https://bugzilla.suse.com/show_bug.cgi?id=CVE-2025-23389
- https://github.com/rancher/rancher/pull/48964
- https://github.com/rancher/rancher/pull/49030
- https://github.com/rancher/rancher/pull/49031
- https://github.com/rancher/rancher/commit/4b885322eaf9995a1054bb46e019841653dc0d10
- https://github.com/rancher/rancher/commit/cda77b743788feb8df8aedf9fd409ed0916a8723
- https://github.com/rancher/rancher/commit/f36b896a99441985a1658e1b8c504d77e52fee4f
- https://github.com/rancher/rancher/releases/tag/v2.10.3
- https://github.com/rancher/rancher/releases/tag/v2.8.13
- https://github.com/rancher/rancher/releases/tag/v2.9.7
- https://github.com/advisories/GHSA-mq23-vvg7-xfm4
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-41052
Rancher has Privilege Escalation from Project Owner to Host
critical8.4Jul 1, 2026CVE-2026-41053
Rancher has over-inclusive team membership expansion in GitHub App authentication provider
high8.8Jul 1, 2026CVE-2026-44939
Rancher vulnerable to command injection through unsanitized YAML parameter
critical9.6Jul 1, 2026CVE-2026-25705
Rancher Extensions have arbitrary file access via path traversal
high8.4May 7, 2026CVE-2021-25320
Rancher cloud credentials can be used through proxy API by users without access
critical9.9Mar 3, 2026CVE-2021-36783
Rancher doesn't properly sanitize credentials in cluster template answers
critical9.9Mar 3, 2026
