CVE-2022-21951: Github.com/rancher/rancher Rancher's Weave CNI Password Is Vulnerability

MODERATE
Advisory Identifier: GHSA-vrph-m5jj-c46c
CVSS 6.8
CWE-319 CWE-311
Published
Advisory Summary

CVE-2022-21951 is a MODERATE (CVSS 6.8) rancher's weave cni password is vulnerability (CWE-319: Cleartext Transmission of Sensitive Information) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves rancher's weave cni password is not configured when a cluster is created from an rke template. Remediation is available by upgrading affected packages to version 2.6.5, 2.5.14.

CVE-2022-21951 at a Glance

CVE Identifier CVE-2022-21951
GHSA Identifier GHSA-vrph-m5jj-c46c
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-319: Cleartext Transmission of Sensitive Information
Affected Product Github.com/rancher/rancher
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-21951

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.

github.com/rancher/rancher fixed: 2.6.5
Upgrade github.com/rancher/rancher to 2.6.5
github.com/rancher/rancher fixed: 2.5.14
Upgrade github.com/rancher/rancher to 2.5.14
Verify Direct and Transitive Dependencies

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-2022-21951, 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.6.5), 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-319: Cleartext Transmission of Sensitive Information, where the product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. 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

### Impact This vulnerability only affects customers using [Weave](https://rancher.com/docs/rancher/v2.6/en/faq/networking/cni-providers/#weave) CNI (Container Network Interface) when configured through [RKE templates](https://rancher.com/docs/rancher/v2.6/en/admin-settings/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](https://www.weave.works/docs/net/latest/tasks/manage/security-untrusted-networks/) 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 1. 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. ```shell $ kubectl -n kube-system edit ds weave-net ``` ```yaml <snipped> containers: - command: - /home/weave/launch.sh env: - name: INIT_CONTAINER value: "true" - name: HOSTNAME valueFrom: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - name: IPALLOC_RANGE value: <IP allocation range> - name: WEAVE_PASSWORD value: "insert strong secret password here" image: <Weave image> <snipped> ``` 2. A new [RKE template revision](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rke-templates/creating-and-revising/) must be created in order to properly generate the Weave password on new clusters. **Notes** 1. 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](https://www.weave.works/docs/net/latest/tasks/manage/security-untrusted-networks/). 2. 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](https://github.com/rancher/rancher/security/policy) for security related inquiries. * Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository. * Verify SUSE Rancher [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).

CVE-2022-21951 Affected Github.com/rancher/rancher Versions

2 component(s)
Fixed Versions:
2.6.52.5.14
Product / Package Ecosystem Affected Versions Fixed Version
github.com/rancher/rancher
Go
≥ 2.6.0
< 2.6.5
2.6.5
github.com/rancher/rancher
Go
≥ 2.5.0
< 2.5.14
2.5.14

References

Frequently Asked Questions

What is CVE-2022-21951?
CVE-2022-21951 is a security vulnerability in Github.com/rancher/rancher involving Rancher's weave CNI password is not configured when a cluster is created from an RKE template under CWE-319: Cleartext Transmission of Sensitive Information.
Which Github.com/rancher/rancher versions are affected?
Affected versions include releases prior to 2.6.5, 2.5.14 across affected packages: github.com/rancher/rancher.
What version fixes CVE-2022-21951?
Upgrading to 2.6.5, 2.5.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/rancher/rancher affected?
Yes, github.com/rancher/rancher is affected in releases prior to 2.6.5, 2.5.14. Upgrade your dependency to 2.6.5, 2.5.14 or later.
What is the CVSS score of CVE-2022-21951?
CVE-2022-21951 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2022-21951?
CVE-2022-21951 is classified under CWE-319: Cleartext Transmission of Sensitive Information (The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.).
How can I check Go dependencies for CVE-2022-21951?
Run the dependency tree command: 'inspect dependencies for github.com/rancher/rancher'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vrph-m5jj-c46c",
  "modified" : "2026-03-03T14:50:34Z",
  "published" : "2026-03-03T14:50:33Z",
  "aliases" : [ "CVE-2022-21951" ],
  "summary" : "Rancher's weave CNI password is not configured when a cluster is created from an RKE template",
  "details" : "### Impact\n\nThis vulnerability only affects customers using [Weave](https://rancher.com/docs/rancher/v2.6/en/faq/networking/cni-providers/#weave) CNI (Container Network Interface) when configured through [RKE templates](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rke-templates/).\n\nA 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.\n\nIf a cluster is created based on the mentioned template and Weave is configured as the CNI, no password will be created for [network encryption](https://www.weave.works/docs/net/latest/tasks/manage/security-untrusted-networks/) in Weave, therefore network traffic in the cluster will be sent unencrypted.\n\nThis issue does not happen when a cluster, with Weave configured as CNI, is created without using an RKE template.\n\nThe 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.\n\n### Patches\n\nPatched 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.\n\n### Workarounds\n\n1. 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.\n\n```shell\n$ kubectl -n kube-system edit ds weave-net\n```\n```yaml\n<snipped>\n      containers:\n      - command:\n        - /home/weave/launch.sh\n        env:\n        - name: INIT_CONTAINER\n          value: \"true\"\n        - name: HOSTNAME\n          valueFrom:\n            fieldRef:\n              apiVersion: v1\n              fieldPath: spec.nodeName\n        - name: IPALLOC_RANGE\n          value: <IP allocation range>\n        - name: WEAVE_PASSWORD\n          value: \"insert strong secret password here\"\n        image: <Weave image>\n<snipped>\n```\n2. A new [RKE template revision](https://rancher.com/docs/rancher/v2.6/en/admin-settings/rke-templates/creating-and-revising/) must be created in order to properly generate the Weave password on new clusters.\n\n**Notes**\n\n1. 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](https://www.weave.works/docs/net/latest/tasks/manage/security-untrusted-networks/).\n\n2. 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.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Reach out to [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries.\n* Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository.\n* Verify SUSE Rancher [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rancher/rancher"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.6.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rancher/rancher"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0"
      }, {
        "fixed" : "2.5.14"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.5.13"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rancher/rancher/security/advisories/GHSA-vrph-m5jj-c46c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-21951"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.suse.com/show_bug.cgi?id=1199443"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rancher/rancher"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-311", "CWE-319" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T14:50:33Z",
    "nvd_published_at" : "2022-05-25T09:15:08Z"
  }
}