CVE-2021-25320: Github.com/rancher/rancher Rancher Cloud Credentials Can Be Vulnerability
CRITICALCVE-2021-25320 is a CRITICAL (CVSS 9.9) rancher cloud credentials can be vulnerability (CWE-284: Improper Access Control) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves rancher cloud credentials can be used through proxy api by users without access. Remediation is available by upgrading affected packages to version 2.4.16, 2.5.9.
CVE-2021-25320 at a Glance
Security Impact
CVSS: 9.9
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:C/C:H/I:H/A:H).
How to Fix CVE-2021-25320
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.4.16
Upgrade github.com/rancher/rancher to 2.5.9
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-2021-25320, 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.4.16), 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. 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-2021-25320 Affected Github.com/rancher/rancher Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/rancher/rancher
|
Go |
≥ 2.2.0
< 2.4.16
|
2.4.16
|
|
github.com/rancher/rancher
|
Go |
≥ 2.5.0
< 2.5.9
|
2.5.9
|
References
Frequently Asked Questions
What is CVE-2021-25320?
Which Github.com/rancher/rancher versions are affected?
What version fixes CVE-2021-25320?
Is github.com/rancher/rancher affected?
What is the CVSS score of CVE-2021-25320?
What CWE is associated with CVE-2021-25320?
How can I check Go dependencies for CVE-2021-25320?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gqf8-rvrh-g7w6",
"modified" : "2026-03-03T14:52:15Z",
"published" : "2026-03-03T14:52:15Z",
"aliases" : [ "CVE-2021-25320" ],
"summary" : "Rancher cloud credentials can be used through proxy API by users without access",
"details" : "A vulnerability was discovered in Rancher 2.2.0 through the aforementioned patched versions, where cloud credentials weren't being properly validated through the Rancher API. Specifically through a proxy designed to communicate with cloud providers. Any Rancher user that was logged-in and aware of a cloud-credential ID that was valid for a given cloud provider, could call that cloud provider's API through the proxy API, and the cloud-credential would be attached. The exploit is limited to valid Rancher users. There is not a direct mitigation outside of upgrading to the patched Rancher versions.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/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.2.0"
}, {
"fixed" : "2.4.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rancher/rancher"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rancher/rancher/security/advisories/GHSA-gqf8-rvrh-g7w6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-25320"
}, {
"type" : "WEB",
"url" : "https://bugzilla.suse.com/show_bug.cgi?id=1185514"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rancher/rancher"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-03T14:52:15Z",
"nvd_published_at" : "2021-07-15T09:15:00Z"
}
}