Skip to content
Heist/ feed
Back to feed
Medium

Improper KubeConfig handling allows arbitrary code execution

Type: advisorySources: OSV

The GitOps Tools Extension for VSCode relies on kubeconfigs in order to communicate with Kubernetes clusters. A specially crafted kubeconfig leads to arbitrary code execution on behalf of the user running VSCode. Users relying on kubeconfigs that are generated or altered by other processes or users are affected by this issue. Please note that the vulnerability is specific to this extension, and the same kubeconfig would not result in arbitrary code execution when used with kubectl. Using only trust-worthy kubeconfigs is a safe mitigation. However, updating to the latest version of the extension is still highly recommended.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-35976
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 17:13 UTC · Revision 1

Source evidence

Improper KubeConfig handling allows arbitrary code execution

core-osv · Original source

Published 18 Aug 2022, 18:50 UTC

The GitOps Tools Extension for VSCode relies on kubeconfigs in order to communicate with Kubernetes clusters. A specially crafted kubeconfig leads to arbitrary code execution on behalf of the user running VSCode. Users relying on kubeconfigs that are generated or altered by other processes or users are affected by this issue. Please note that the vulnerability is specific to this extension, and the same kubeconfig would not result in arbitrary code execution when used with kubectl. Using only trust-worthy kubeconfigs is a safe mitigation. However, updating to the latest version of the extension is still highly recommended.

osv:CVE-2022-35976
Complete source record
{
  "id": "51868cf1556767fe2881dce3099a285a9e1b20c42ebc669a58c16fd32ade8f06",
  "url": "https://osv.dev/vulnerability/CVE-2022-35976",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Improper KubeConfig handling allows arbitrary code execution",
    "summary": "The GitOps Tools Extension for VSCode relies on kubeconfigs in order to communicate with Kubernetes clusters. A specially crafted kubeconfig leads to arbitrary code execution on behalf of the user running VSCode. Users relying on kubeconfigs that are generated or altered by other processes or users are affected by this issue. Please note that the vulnerability is specific to this extension, and the same kubeconfig would not result in arbitrary code execution when used with kubectl. Using only trust-worthy kubeconfigs is a safe mitigation. However, updating to the latest version of the extension is still highly recommended.",
    "evidence": "osv:CVE-2022-35976",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-35976",
      "aliases": [
        "CVE-2022-35976",
        "GHSA-287h-vjhw-jqf7"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/weaveworks/vscode-gitops-tools",
              "type": "GIT",
              "events": [
                {
                  "introduced": "874053b095d7f5568d77b4f688147dac26773f76"
                },
                {
                  "last_affected": "2423fee143459247c6b961beffed4c13b31c2a3b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.5.0"
                      },
                      {
                        "last_affected": "0.20.9"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:weave:gitops_tools:*:*:*:*:*:visual_studio_code:*:*",
                    "range": [
                      {
                        "introduced": "0.5.0"
                      },
                      {
                        "last_affected": "0.20.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.20.9",
            "0.20.9",
            "v0.19.2-pre4",
            "v0.19.2-pre3",
            "v0.19.0",
            "v0.18.0",
            "v0.17.0",
            "v0.16.0",
            "v0.15.0",
            "v0.14.0",
            "v0.13.0",
            "v0.12.0",
            "v0.11.0",
            "v0.10.0",
            "v0.9.0",
            "v0.7.0",
            "v0.6.0",
            "v0.5.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35976.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.779199337Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35976.json",
        "https://github.com/weaveworks/vscode-gitops-tools/security/advisories/GHSA-287h-vjhw-jqf7",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-35976"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-78"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35976.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-35976",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487597,
  "published_at": "2022-08-18T18:50:08+00:00"
}