CVE-2021-25320 — rancher
CRITICALCVE-2021-25320 is a critical-severity (CVSS 9.9) CWE-284 vulnerability in github.com/rancher/rancher. A fix is available for github.com/rancher/rancher — see the affected versions and patch details below.
Rancher cloud credentials can be used through proxy API by users without access
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/rancher/rancher🐹github.com/rancher/rancherReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/rancher/rancher | ≥ 2.2.0&&< 2.4.16 | 2.4.16go get github.com/rancher/rancher@v2.4.16 |
| 🐹Go | github.com/rancher/rancher | ≥ 2.5.0&&< 2.5.9 | 2.5.9go get github.com/rancher/rancher@v2.5.9 |
Affected Products
rancherrancherDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rancher/rancher, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/rancher/rancher to 2.4.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-25320 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2021-25320 in your dependencies?
Find it across Go, including transitive dependencies.