Summary
Weave GitOps leaked cluster credentials into logs on connection errors
Workarounds
There is no workaround for this vulnerability.
References
Disclosed by Stefan Prodan, Principal Engineer, Weaveworks.
For more information
If you have any questions or comments about this advisory:
- Open an issue in Weave GitOps repository
- Email us at [email protected]
Impact
A vulnerability in the logging of Weave GitOps could allow an authenticated remote attacker to view sensitive cluster configurations, aka KubeConfg, of registered Kubernetes clusters, including the service account tokens in plain text from Weave GitOps's pod logs on the management cluster. An unauthorized remote attacker can also view these sensitive configurations from external log storage if enabled by the management cluster.
This vulnerability is due to the client factory dumping cluster configurations and their service account tokens when the cluster manager tries to connect to an API server of a registered cluster, and a connection error occurs. An attacker could exploit this vulnerability by either accessing logs of a pod of Weave GitOps, or from external log storage and obtaining all cluster configurations of registered clusters.
A successful exploit could allow the attacker to use those cluster configurations to manage the registered Kubernetes clusters.
CVE-2022-31098 has a CVSS score of 9.0 (Critical). The vector is network-reachable, low privileges required, and user interaction required. 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 (0.8.1-rc.6); upgrading removes the vulnerable code path.
Affected versions
Security releases
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. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
This vulnerability has been fixed by commit 567356f471353fb5c676c77f5abc2a04631d50ca. Users should upgrade to Weave GitOps core version >= v0.8.1-rc.6 released on 31/05/2022.
Frequently Asked Questions
- What is CVE-2022-31098? CVE-2022-31098 is a critical-severity security vulnerability in github.com/weaveworks/weave-gitops (go), affecting versions <= 0.8.1-rc.5. It is fixed in 0.8.1-rc.6.
- How severe is CVE-2022-31098? CVE-2022-31098 has a CVSS score of 9.0 (Critical). 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/weaveworks/weave-gitops are affected by CVE-2022-31098? github.com/weaveworks/weave-gitops (go) versions <= 0.8.1-rc.5 is affected.
- Is there a fix for CVE-2022-31098? Yes. CVE-2022-31098 is fixed in 0.8.1-rc.6. Upgrade to this version or later.
- Is CVE-2022-31098 exploitable, and should I be worried? Whether CVE-2022-31098 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-31098 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-31098? Upgrade
github.com/weaveworks/weave-gitopsto 0.8.1-rc.6 or later.