# CVE-2022-24817: Improper kubeconfig validation allows arbitrary code execution

Source: https://junglewise.ai/threats/cve-2022-24817-improper-kubeconfig-validation-allows-arbitrary-code-execution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-05-16  
License: CC BY 4.0 with a link back

CVE-2022-24817 · Severity: low · CVSS 3.1 · Published 2022-05-16

Improper kubeconfig validation allows arbitrary code execution

Technologies: [github.com/fluxcd/flux2 (Go)](https://junglewise.ai/threats/technologies/github-com-fluxcd-flux2), [github.com/fluxcd/helm-controller (Go)](https://junglewise.ai/threats/technologies/github-com-fluxcd-helm-controller), [github.com/fluxcd/kustomize-controller (Go)](https://junglewise.ai/threats/technologies/github-com-fluxcd-kustomize-controller). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2022-24817 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-24817 being exploited in the wild.

**How severe is CVE-2022-24817?** Low severity, with a CVSS score of 3.1, published 16 May 2022.

**Which products and versions are affected?** github.com/fluxcd/flux2 (Go) SEMVER:introduced=0.1.0,fixed=0.29.0; github.com/fluxcd/helm-controller (Go) SEMVER:introduced=0.2.0,fixed=0.19.0; github.com/fluxcd/kustomize-controller (Go) SEMVER:introduced=0.1.0,fixed=0.23.0.

**Is there a fix for CVE-2022-24817?** Yes. github.com/fluxcd/flux2 (Go): upgrade to 0.29.0 or later; github.com/fluxcd/helm-controller (Go): upgrade to 0.19.0 or later; github.com/fluxcd/kustomize-controller (Go): upgrade to 0.23.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-24817?** Check whether you run github.com/fluxcd/flux2 (Go), github.com/fluxcd/helm-controller (Go) or github.com/fluxcd/kustomize-controller (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/fluxcd/flux2 (Go): upgrade to 0.29.0 or later

  ```sh
  go get github.com/fluxcd/flux2@v0.29.0
  ```

- github.com/fluxcd/helm-controller (Go): upgrade to 0.19.0 or later

  ```sh
  go get github.com/fluxcd/helm-controller@v0.19.0
  ```

- github.com/fluxcd/kustomize-controller (Go): upgrade to 0.23.0 or later

  ```sh
  go get github.com/fluxcd/kustomize-controller@v0.23.0
  ```


## Affected products

- github.com/fluxcd/flux2 (Go) SEMVER:introduced=0.1.0,fixed=0.29.0
- github.com/fluxcd/helm-controller (Go) SEMVER:introduced=0.2.0,fixed=0.19.0
- github.com/fluxcd/kustomize-controller (Go) SEMVER:introduced=0.1.0,fixed=0.23.0

## Identifiers

- CVE-2022-24817
- GHSA-vvmq-fwmg-2gjc

## Related threats

- [GO-2022-0960 - Flux CLI Workload Injection in github.com/fluxcd/flux2](https://junglewise.ai/threats/cve-2022-36035-flux-cli-workload-injection)
- [GO-2022-0448 - Improper path handling in Kustomization files allows for denial of service in github.com/fluxcd/flux2](https://junglewise.ai/threats/cve-2022-24878-improper-path-handling-in-kustomization-files-allows-for-denial)
- [GO-2022-0447 - Improper path handling in kustomization files allows path traversal in github.com/fluxcd/flux2](https://junglewise.ai/threats/cve-2022-24877-improper-path-handling-in-kustomization-files-allows-path)
- [GO-2022-0260 - Privilege escalation to cluster admin on multi-tenant environments in github.com/fluxcd/kustomize-controller](https://junglewise.ai/threats/cve-2021-41254-privilege-escalation-to-cluster-admin-on-multi-tenant)
- [GO-2022-1071 - Denial of service in flux controllers in github.com/fluxcd modules](https://junglewise.ai/threats/cve-2022-39272-improper-use-of-metav1-duration-allows-for-denial-of-service)
