CVE-2022-23508: Github.com/weaveworks/weave gitops GitOps Run Allows For Kubernetes Vulnerability

HIGH
Advisory Identifier: GHSA-wr3c-g326-486c
CVSS 8.8
CWE-552 CWE-284
Published
Advisory Summary

CVE-2022-23508 is a HIGH (CVSS 8.8) gitops run allows for kubernetes vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Github.com/weaveworks/weave gitops libraries in the Go ecosystem. The issue involves gitops run allows for kubernetes workload injection. Remediation is available by upgrading affected packages to version 0.12.0.

CVE-2022-23508 at a Glance

CVE Identifier CVE-2022-23508
GHSA Identifier GHSA-wr3c-g326-486c
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-552: Files or Directories Accessible to External Parties
Affected Product Github.com/weaveworks/weave gitops
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

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

How to Fix CVE-2022-23508

To remediate this vulnerability, upgrade all affected Github.com/weaveworks/weave gitops 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/weaveworks/weave-gitops fixed: 0.12.0
Upgrade github.com/weaveworks/weave-gitops to 0.12.0
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/weaveworks/weave-gitops

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-23508, inspect your project dependencies for Github.com/weaveworks/weave gitops:

inspect dependencies for github.com/weaveworks/weave-gitops

Analyze the terminal output to locate any version of Github.com/weaveworks/weave gitops in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.0), 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-552: Files or Directories Accessible to External Parties, where the product makes files or directories accessible to unauthorized actors, even though they should not be. In Github.com/weaveworks/weave gitops, 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 A vulnerability in GitOps run could allow a local user or process to alter a Kubernetes cluster's resources. GitOps run has a local S3 bucket which it uses for synchronising files that are later applied against a Kubernetes cluster. Its endpoint had no security controls to block unauthorised access, therefore allowing local users (and processes) on the same machine to see and alter the bucket content. By leveraging this vulnerability, an attacker could pick a workload of their choosing and inject it into the S3 bucket, which resulted in the successful deployment in the target cluster, without the need to provide any credentials to either the S3 bucket nor the target Kubernetes cluster. ### Patches This vulnerability has been fixed by commits [75268c4](https://github.com/weaveworks/weave-gitops/pull/3114/commits/75268c4d2c8f7e4db22c63d76b451ba6545d117f) and [966823b](https://github.com/weaveworks/weave-gitops/pull/3102/commits/966823bbda8c539a4661e2a4f8607c9307ba6225). Users should upgrade to Weave GitOps version >= v0.12.0 released on 08/12/2022. ### Workarounds There is no workaround for this vulnerability. ### References Disclosed by Paulo Gomes, Senior Software Engineer, Weaveworks. ### For more information If you have any questions or comments about this advisory: - Open an issue in [Weave GitOps repository](https://github.com/weaveworks/weave-gitops) - Email us at [support@weave.works](mailto:support@weave.works)

CVE-2022-23508 Affected Github.com/weaveworks/weave gitops Versions

1 component(s)
Fixed Versions:
0.12.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/weaveworks/weave-gitops
Go
< 0.12.0
0.12.0

References

Frequently Asked Questions

What is CVE-2022-23508?
CVE-2022-23508 is a security vulnerability in Github.com/weaveworks/weave gitops involving GitOps Run allows for Kubernetes workload injection under CWE-552: Files or Directories Accessible to External Parties.
Which Github.com/weaveworks/weave gitops versions are affected?
Affected versions include releases prior to 0.12.0 across affected packages: github.com/weaveworks/weave-gitops.
What version fixes CVE-2022-23508?
Upgrading to 0.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/weaveworks/weave-gitops affected?
Yes, github.com/weaveworks/weave-gitops is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
What is the CVSS score of CVE-2022-23508?
CVE-2022-23508 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2022-23508?
CVE-2022-23508 is classified under CWE-552: Files or Directories Accessible to External Parties (The product makes files or directories accessible to unauthorized actors, even though they should not be.).
How can I check Go dependencies for CVE-2022-23508?
Run the dependency tree command: 'inspect dependencies for github.com/weaveworks/weave-gitops'. 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-wr3c-g326-486c",
  "modified" : "2023-01-09T19:45:01Z",
  "published" : "2023-01-09T19:45:01Z",
  "aliases" : [ "CVE-2022-23508" ],
  "summary" : "GitOps Run allows for Kubernetes workload injection",
  "details" : "### Impact\nA vulnerability in GitOps run could allow a local user or process to alter a Kubernetes cluster's resources.\n\nGitOps run has a local S3 bucket which it uses for synchronising files that are later applied against a Kubernetes cluster. Its endpoint had no security controls to block unauthorised access, therefore allowing local users (and processes) on the same machine to see and alter the bucket content.\n\nBy leveraging this vulnerability, an attacker could pick a workload of their choosing and inject it into the S3 bucket, which resulted in the successful deployment in the target cluster, without the need to provide any credentials to either the S3 bucket nor the target Kubernetes cluster.\n\n### Patches\nThis vulnerability has been fixed by commits [75268c4](https://github.com/weaveworks/weave-gitops/pull/3114/commits/75268c4d2c8f7e4db22c63d76b451ba6545d117f) and [966823b](https://github.com/weaveworks/weave-gitops/pull/3102/commits/966823bbda8c539a4661e2a4f8607c9307ba6225). Users should upgrade to Weave GitOps version >= v0.12.0 released on 08/12/2022.\n\n### Workarounds\nThere is no workaround for this vulnerability.\n\n### References\nDisclosed by Paulo Gomes, Senior Software Engineer, Weaveworks.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [Weave GitOps repository](https://github.com/weaveworks/weave-gitops)\n- Email us at [support@weave.works](mailto:support@weave.works)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/weaveworks/weave-gitops"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.12.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.11.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/weaveworks/weave-gitops/security/advisories/GHSA-wr3c-g326-486c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23508"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/weaveworks/weave-gitops/pull/3102/commits/966823bbda8c539a4661e2a4f8607c9307ba6225"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/weaveworks/weave-gitops/pull/3114/commits/75268c4d2c8f7e4db22c63d76b451ba6545d117f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/weaveworks/weave-gitops"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284", "CWE-552" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-09T19:45:01Z",
    "nvd_published_at" : "2023-01-09T13:15:00Z"
  }
}