NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2025-23387: Rancher's SAML-based login via CLI can be denied by unauthenticated users

mediumCVSS 3.1 5.3GHSA-5qmp-9x47-92q8

Impact A vulnerability has been identified within Rancher where it is possible for an unauthenticated user to list all CLI authentication tokens and delete them before the CLI is able to get the token value. This effectively prevents users from logging in via the CLI when using rancher token as the execution command (instead of the token directly being in the kubeconfig).

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 has been identified within Rancher where it is possible for an unauthenticated user to list all CLI authentication tokens and delete them before the CLI is able to get the token value. This effectively prevents users from logging in via the CLI when using rancher token as the execution command (instead of the token directly being in the kubeconfig).

Note that this token is not the kubeconfig token and if an attacker is able to intercept it they can't use it to impersonate a real user since it is encrypted.

This happens because for SAML-based authentication providers, the login flow from the CLI works by generating a link to be pasted in the browser, and then polling every 10 seconds for the /v3-public/authTokens/<token name> endpoint. The <token name> is randomly generated by the CLI. Once the login flow succeeds, Rancher creates an auth token (with an encrypted token value). The CLI then deletes the authToken.

Rancher deployments using only the local authentication provider, or non-SAML-based authentication providers, are not impacted by this vulnerability. SAML-based users not using the CLI are also not impacted.

Please consult the associated MITRE ATT&CK - Technique - Account Access Removal for further information about this category of attack.

Patches

The fix involves removing GET and DELETE methods for the authTokens collection.

Patched versions include releases v2.8.13, v2.9.7 and v2.10.3.

Workarounds

Users can refrain from using the Rancher CLI to log in as a workaround. Otherwise, users are advised to upgrade to a patched version of Rancher Manager.

References

If you have any questions or comments about this advisory:

Credited to AnonySE26.

References

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 entries