CVE-2022-21951: Github.com/rancher/rancher Rancher's Weave CNI Password Is Vulnerability
MODERATECVE-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
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).
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.
Upgrade github.com/rancher/rancher to 2.6.5
Upgrade github.com/rancher/rancher to 2.5.14
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
CVE-2022-21951 Affected Github.com/rancher/rancher Versions
2 component(s)| 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?
Which Github.com/rancher/rancher versions are affected?
What version fixes CVE-2022-21951?
Is github.com/rancher/rancher affected?
What is the CVSS score of CVE-2022-21951?
What CWE is associated with CVE-2022-21951?
How can I check Go dependencies for CVE-2022-21951?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}