{"answers":{"affected":"3 open source packages ship an affected version, including github.com/weaveworks/weave-gitops. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31098 in the wild and no public exploit code.","fix":"Upgrade github.com/weaveworks/weave-gitops to 0.8.1-rc.6 or later.","what":"CVE-2022-31098 is a critical vulnerability in weaveworks weave-gitops, published on 27 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-31098 and fix it if it is affected.\n\nWhat it is: CVE-2022-31098 is a critical vulnerability in weaveworks weave-gitops, published on 27 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-31098 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/weaveworks/weave-gitops (Go): affected all versions; fixed in 0.8.1-rc.6\n- github.com/weaveworks/weave-gitops (Go): affected all versions; fixed in 0.8.1-rc.6\n- github.com/weaveworks/weave-gitops (Go): affected all versions; fixed in 0.8.1-rc.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31098/ (Markdown: https://insights.sbomify.com/CVE-2022-31098/index.md)","id":"CVE-2022-31098","markdown":"https://insights.sbomify.com/CVE-2022-31098/index.md","name":"CVE-2022-31098","record":{"aliases":["GHSA-xggc-qprg-x6mw","GO-2022-0502"],"analysis":{"component_type":"cloud_service","fix_type":"upgrade","impacts":["data_read","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Weave GitOps","requires_auth":"low_privilege","summary":"Attackers can access sensitive Kubernetes cluster credentials and service account tokens from Weave GitOps logs, enabling unauthorized cluster management.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"weave_gitops","vendor":"weave"}],"cvss":{"score":9,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-532","name":"Insertion of Sensitive Information into Log File"}],"description":"Weave GitOps is a simple open source developer platform for people who want cloud native applications, without needing Kubernetes expertise. 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. This vulnerability has been fixed by commit 567356f471353fb5c676c77f5abc2a04631d50ca. Users should upgrade to Weave GitOps core version v0.8.1-rc.6 or newer. There is no known workaround for this vulnerability.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Weave GitOps leaked cluster credentials into logs on connection errors","id":"CVE-2022-31098","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":3,"n_references":2,"next":{"headline":"Uncontrolled Recursion in rulex","id":"CVE-2022-31099"},"packages":[{"ecosystem":"Go","fixed":["0.8.1-rc.6"],"introduced":["0"],"last_affected":[],"package":"github.com/weaveworks/weave-gitops","purl":null,"source":"GHSA-xggc-qprg-x6mw"},{"ecosystem":"Go","fixed":["0.8.1-rc.6"],"introduced":["0"],"last_affected":[],"package":"github.com/weaveworks/weave-gitops","purl":"pkg:golang/github.com/weaveworks/weave-gitops","source":"GHSA-xggc-qprg-x6mw"},{"ecosystem":"Go","fixed":["0.8.1-rc.6"],"introduced":["0"],"last_affected":[],"package":"github.com/weaveworks/weave-gitops","purl":"pkg:golang/github.com/weaveworks/weave-gitops","source":"GO-2022-0502"}],"prev":{"headline":"Stored XSS in Grafana's Unified Alerting","id":"CVE-2022-31097"},"products":["weave-gitops"],"published":"2022-06-27","related":[{"cvss_score":8.9,"headline":"GitOps Run allows for Kubernetes workload injection","id":"CVE-2022-23508","kev_date_added":null,"published":"2023-01-09"},{"cvss_score":7.4,"headline":"Weave Gitops Run vulnerable to insecure communication","id":"CVE-2022-23509","kev_date_added":null,"published":"2023-01-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["weaveworks"]},"summary":"Attackers can access sensitive Kubernetes cluster credentials and service account tokens from Weave GitOps logs, enabling unauthorized cluster management.","url":"https://insights.sbomify.com/CVE-2022-31098/"}