CVE-2022-31098

9.0 CRITICAL

📋 TL;DR

This vulnerability in Weave GitOps allows authenticated remote attackers to view sensitive Kubernetes cluster configurations and service account tokens in plain text from pod logs. Unauthorized attackers can also access this data from external log storage if enabled. All users running vulnerable versions of Weave GitOps are affected.

💻 Affected Systems

Products:
  • Weave GitOps
Versions: All versions before v0.8.1-rc.6
Operating Systems: All platforms running Weave GitOps
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when cluster manager fails to connect to API server of registered cluster, causing sensitive data to be logged.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain full administrative access to all registered Kubernetes clusters, enabling data theft, resource hijacking, or complete cluster compromise.

🟠

Likely Case

Attackers obtain service account tokens and cluster configurations, allowing them to perform unauthorized operations on registered Kubernetes clusters.

🟢

If Mitigated

With proper log access controls and network segmentation, impact is limited to authorized users who already have pod log access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to pod logs or external log storage. Authenticated access to Weave GitOps or its management cluster is needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.8.1-rc.6 or newer

Vendor Advisory: https://github.com/weaveworks/weave-gitops/security/advisories/GHSA-xggc-qprg-x6mw

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Upgrade Weave GitOps to v0.8.1-rc.6 or newer using your deployment method (Helm, kubectl, etc.). 3. Restart all Weave GitOps pods. 4. Verify upgrade completed successfully.

🔧 Temporary Workarounds

No official workaround

all

The vendor states there is no known workaround for this vulnerability.

🧯 If You Can't Patch

  • Restrict access to Weave GitOps pod logs using Kubernetes RBAC and network policies.
  • Disable or secure external log storage systems and implement strict access controls for log data.

🔍 How to Verify

Check if Vulnerable:

Check Weave GitOps version: kubectl get pods -n <namespace> -l app=weave-gitops -o jsonpath='{.items[*].spec.containers[*].image}'

Check Version:

kubectl get pods -n <namespace> -l app=weave-gitops -o jsonpath='{.items[*].spec.containers[*].image}' | grep -o 'v[0-9.]\+'

Verify Fix Applied:

Confirm version is v0.8.1-rc.6 or newer and check logs for absence of KubeConfig data during connection errors.

📡 Detection & Monitoring

Log Indicators:

  • Plain text KubeConfig data in pod logs
  • Service account tokens in logs
  • Cluster configuration details in error messages

Network Indicators:

  • Unauthorized access attempts to log storage systems
  • Suspicious API calls to Kubernetes clusters from unexpected sources

SIEM Query:

source="weave-gitops" AND ("kubeconfig" OR "serviceaccount" OR "token:")

🔗 References

📤 Share & Export