Skip to content
Heist/ feed
Back to feed
Critical

Improper kubeconfig validation allows arbitrary code execution

Type: advisorySources: OSV

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

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

Source evidence

Improper kubeconfig validation allows arbitrary code execution

core-osv · Original source

Published 6 May 2022, 00:00 UTC

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

osv:CVE-2022-24817
Complete source record
{
  "id": "68cf3b6b458dbcf2ab903f871838b37aba6a45408174fb2a4f89b1d74be05ae3",
  "url": "https://osv.dev/vulnerability/CVE-2022-24817",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Improper kubeconfig validation allows arbitrary code execution",
    "summary": "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",
    "evidence": "osv:CVE-2022-24817",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2022-24817",
      "aliases": [
        "BIT-flux-2022-24817",
        "BIT-kustomize-2022-24817",
        "CVE-2022-24817",
        "GHSA-vvmq-fwmg-2gjc"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/fluxcd/flux2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "70d0bfce15a916b73b060af53142ff342051f920"
                },
                {
                  "fixed": "5346c1cca31261453f1100b3516a77750e46bb17"
                },
                {
                  "fixed": "e2a38006646386965485d803cf310e39da00b3c7"
                },
                {
                  "introduced": "3cf54a4cce79536e67fcb9cf190fccfc910b166d"
                },
                {
                  "fixed": "87feb45751f5c1b49e62525698faa569c98c98ca"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:fluxcd:flux2:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.1.0"
                      },
                      {
                        "fixed": "0.29.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:fluxcd:kustomize-controller:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.1.0"
                      },
                      {
                        "fixed": "0.23.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:fluxcd:helm-controller:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.2.0"
                      },
                      {
                        "fixed": "0.19.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.18.3",
            "v0.18.2",
            "v0.18.1",
            "v0.18.0",
            "v0.17.2",
            "v0.17.1",
            "v0.17.0",
            "v0.16.2",
            "v0.16.1",
            "v0.15.2",
            "v0.16.0",
            "v0.15.3",
            "v0.15.1",
            "v0.15.0",
            "v0.14.2",
            "v0.14.1",
            "v0.14.0",
            "v0.13.4",
            "v0.13.3",
            "v0.13.2",
            "v0.13.1",
            "v0.13.0",
            "v0.12.3",
            "v0.12.2",
            "v0.12.1",
            "v0.12.0",
            "v0.11.0",
            "v0.10.0",
            "v0.9.1",
            "v0.9.0",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.7",
            "v0.7.6",
            "v0.7.5",
            "v0.7.4",
            "v0.7.3",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.3",
            "v0.6.2",
            "v0.6.1",
            "v0.6.0",
            "v0.5.7",
            "v0.5.9",
            "v0.5.8",
            "v0.5.6",
            "v0.5.5",
            "v0.5.4",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.3",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.0",
            "v0.2.6",
            "v0.2.5",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24817.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/fluxcd/helm-controller",
              "type": "GIT",
              "events": [
                {
                  "introduced": "394824c465797a31afd95d275c555c68c8ed1b7b"
                },
                {
                  "fixed": "cbe622fc0ca8db0998672b0f5f99c0646d36d1ae"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:fluxcd:helm-controller:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.2.0"
                      },
                      {
                        "fixed": "0.19.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "api/v0.19.0",
            "v0.18.2",
            "api/v0.18.2",
            "v0.18.1",
            "api/v0.18.1",
            "v0.18.0",
            "api/v0.18.0",
            "v0.17.1",
            "api/v0.17.1",
            "v0.17.0",
            "api/v0.17.0",
            "v0.16.0",
            "api/v0.16.0",
            "v0.15.0",
            "api/v0.15.0",
            "v0.14.1",
            "api/v0.14.1",
            "v0.14.0",
            "api/v0.14.0",
            "v0.13.0",
            "api/v0.13.0",
            "v0.12.2",
            "api/v0.12.2",
            "v0.12.1",
            "api/v0.12.1",
            "v0.12.0",
            "api/v0.12.0",
            "v0.11.2",
            "v0.11.1",
            "api/v0.11.1",
            "v0.11.0",
            "api/v0.11.0",
            "v0.10.1",
            "api/v0.10.1",
            "v0.10.0",
            "api/v0.10.0",
            "v0.9.0",
            "api/v0.9.0",
            "v0.8.2",
            "api/v0.8.2",
            "v0.8.1",
            "api/v0.8.1",
            "v0.8.0",
            "api/v0.8.0",
            "v0.7.0",
            "api/v0.7.0",
            "v0.6.1",
            "api/v0.6.1",
            "v0.6.0",
            "api/v0.6.0",
            "v0.5.2",
            "api/v0.5.2",
            "v0.5.1",
            "api/v0.5.1",
            "v0.5.0",
            "api/v0.5.0",
            "v0.4.4",
            "api/v0.4.4",
            "v0.4.3",
            "api/v0.4.3",
            "v0.4.2",
            "api/v0.4.2",
            "v0.4.1",
            "api/v0.4.1",
            "v0.4.0",
            "api/v0.4.0",
            "v0.3.0",
            "api/v0.3.0",
            "v0.2.2",
            "api/v0.2.2",
            "v0.2.1",
            "api/v0.2.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24817.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/fluxcd/kustomize-controller",
              "type": "GIT",
              "events": [
                {
                  "introduced": "8e16bd4c926846959f7996648223d22ef29b6648"
                },
                {
                  "fixed": "6bc847b339cc292622620e2e88bd2b8f01552067"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:fluxcd:kustomize-controller:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.1.0"
                      },
                      {
                        "fixed": "0.23.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "api/v0.23.0",
            "v0.22.3",
            "api/v0.22.3",
            "v0.22.2",
            "api/v0.22.2",
            "v0.22.1",
            "api/v0.22.1",
            "v0.22.0",
            "api/v0.22.0",
            "v0.21.1",
            "api/v0.21.1",
            "v0.21.0",
            "api/v0.21.0",
            "v0.20.2",
            "api/v0.20.2",
            "v0.20.1",
            "api/v0.20.1",
            "v0.20.0",
            "api/v0.20.0",
            "v0.19.1",
            "v0.18.2",
            "api/v0.19.1",
            "v0.19.0",
            "api/v0.19.0",
            "api/v0.18.2",
            "v0.18.1",
            "api/v0.18.1",
            "v0.18.0",
            "api/v0.18.0",
            "v0.17.0",
            "api/v0.17.0",
            "v0.16.0",
            "api/v0.16.0",
            "v0.15.5",
            "api/v0.15.5",
            "v0.15.4",
            "api/v0.15.4",
            "v0.15.3",
            "api/v0.15.3",
            "v0.15.2",
            "api/v0.15.2",
            "v0.15.1",
            "api/v0.15.1",
            "v0.15.0",
            "api/v0.15.0",
            "v0.14.1",
            "api/v0.14.1",
            "v0.14.0",
            "api/v0.14.0",
            "v0.13.3",
            "api/v0.13.3",
            "v0.13.2",
            "api/v0.13.2",
            "v0.13.1",
            "v0.12.1",
            "api/v0.13.1",
            "v0.13.0",
            "api/v0.13.0",
            "v0.12.2",
            "api/v0.12.2",
            "api/v0.12.1",
            "v0.12.0",
            "api/v0.12.0",
            "v0.11.1",
            "api/v0.11.1",
            "v0.11.0",
            "api/v0.11.0",
            "v0.10.0",
            "api/v0.10.0",
            "v0.9.1",
            "v0.9.3",
            "api/v0.9.3",
            "v0.9.2",
            "api/v0.9.2",
            "api/v0.9.1",
            "v0.9.0",
            "api/v0.9.0",
            "v0.8.1",
            "api/v0.8.1",
            "v0.8.0",
            "api/v0.8.0",
            "v0.7.4",
            "api/v0.7.4",
            "v0.7.3",
            "api/v0.7.3",
            "v0.7.2",
            "api/v0.7.2",
            "v0.7.1",
            "api/v0.7.1",
            "v0.7.0",
            "api/v0.7.0",
            "v0.6.3",
            "api/v0.6.3",
            "v0.6.2",
            "api/v0.6.2",
            "v0.6.1",
            "api/v0.6.1",
            "v0.6.0",
            "api/v0.6.0",
            "v0.5.3",
            "api/v0.5.3",
            "v0.5.2",
            "api/v0.5.2",
            "v0.5.1",
            "api/v0.5.1",
            "v0.5.0",
            "api/v0.5.0",
            "v0.4.0",
            "api/v0.4.0",
            "v0.3.0",
            "api/v0.3.0",
            "v0.2.2",
            "api/v0.2.2",
            "v0.2.1",
            "api/v0.2.1",
            "v0.2.0",
            "api/v0.2.0",
            "v0.1.2",
            "api/v0.1.2",
            "v0.1.1",
            "api/v0.1.1",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24817.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.577622942Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24817.json",
        "https://github.com/fluxcd/flux2/security/advisories/GHSA-vvmq-fwmg-2gjc",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-24817"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "flux2 < v0.29.0 >= v0.1.0"
                  },
                  {
                    "last_affected": "flux2 < v0.29.0 >= v0.1.0"
                  },
                  {
                    "introduced": "helm-controller < v0.23.0 >= v0.1.0"
                  },
                  {
                    "last_affected": "helm-controller < v0.23.0 >= v0.1.0"
                  },
                  {
                    "introduced": "kustomize-controller < v0.19.0 >= v0.2.0"
                  },
                  {
                    "last_affected": "kustomize-controller < v0.19.0 >= v0.2.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24817.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-24817",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487829,
  "published_at": "2022-05-06T00:00:14+00:00"
}