github.com/rancher/rancher

CVE-2022-21951

CVE-2022-21951 is a medium-severity security vulnerability in github.com/rancher/rancher (go), affecting versions >= 2.6.0, <= 2.6.4. It is fixed in 2.6.5, 2.5.14.

Key facts
CVSS score
6.8
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
github.com/rancher/rancher
Fixed in
2.6.5, 2.5.14
Disclosed
2022

Summary

Impact This vulnerability only affects customers using Weave CNI (Container Network Interface) when configured through RKE templates. A flaw was discovered in Rancher versions from 2.5.0 up to and including 2.5.13 and from 2.6.0 up to and including 2.6.4, where a UI (user interface) issue with RKE templates does not include a value for the Weave password when Weave is chosen as the CNI. If a cluster is created based on the mentioned template and Weave is configured as the CNI, no password will be created for network encryption in Weave, therefore network traffic in the cluster will be sent unencrypted. This issue does not happen when a cluster, with Weave configured as CNI, is created without using an RKE template. The impact of this vulnerability is higher when nodes on the cluster are on different locations and communicate with one another through the Internet, where monitoring (sniffing) of the network traffic by third-party entities can be more easily achieved. Patches Patched versions include releases 2.5.14, 2.6.5 and later versions of Rancher. Besides upgrading to a Rancher patched version, the workarounds listed below must be applied in order for Weave to properly encrypt the network traffic. Workarounds A manual password can be set in Weave by directly editing Weave's DaemonSet on the affected cluster to add the WEAVE_PASSWORD environment variable together with the a value for the password. A new RKE template revision must be created in order to properly generate the Weave password on new clusters. Notes In order to provide protection against brute-force attacks, that might break the network encryption, a strong password must be generated for the workaround. Weave's documentation provides recommendations for generating a strong password. Manually generating the password for the workaround is only needed on affected versions of Rancher. This step is not needed when creating new RKE templates on patched versions of Rancher. For more information If you have any questions or comments about this advisory: Reach out to SUSE Rancher Security team for security related inquiries. Open an issue in Rancher repository. Verify SUSE Rancher support matrix and product support lifecycle.

Impact

Severity and exposure

CVE-2022-21951 has a CVSS score of 6.8 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (2.6.5, 2.5.14). Upgrading removes the vulnerable code path.

Affected versions

go

  • github.com/rancher/rancher (>= 2.6.0, <= 2.6.4)
  • github.com/rancher/rancher (>= 2.5.0, <= 2.5.13)

Security releases

  • github.com/rancher/rancher → 2.6.5 (go)
  • github.com/rancher/rancher → 2.5.14 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2022-21951 is reachable in your applications. Explore open-source security for your team.

See if CVE-2022-21951 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2022-21951 in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

  • Upgrade github.com/rancher/rancher to 2.6.5 or later
  • Upgrade github.com/rancher/rancher to 2.5.14 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2022-21951

What is CVE-2022-21951?

CVE-2022-21951 is a medium-severity security vulnerability in github.com/rancher/rancher (go), affecting versions >= 2.6.0, <= 2.6.4. It is fixed in 2.6.5, 2.5.14.

How severe is CVE-2022-21951?

CVE-2022-21951 has a CVSS score of 6.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of github.com/rancher/rancher are affected by CVE-2022-21951?

github.com/rancher/rancher (go) versions >= 2.6.0, <= 2.6.4 is affected.

Is there a fix for CVE-2022-21951?

Yes. CVE-2022-21951 is fixed in 2.6.5, 2.5.14. Upgrade to this version or later.

Is CVE-2022-21951 exploitable, and should I be worried?

Whether CVE-2022-21951 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2022-21951 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2022-21951?
  • Upgrade github.com/rancher/rancher to 2.6.5 or later
  • Upgrade github.com/rancher/rancher to 2.5.14 or later

Stop the waste.
Protect your environment with Kodem.