{"answers":{"affected":"8 open source packages ship an affected version, including github.com/fluxcd/flux2, flux and kustomize. It affects 3 products.","exploited":"There is no known exploitation of CVE-2022-24817 in the wild and no public exploit code.","fix":"Upgrade github.com/fluxcd/flux2 to 0.29.0 or later.","what":"CVE-2022-24817 is a critical code injection vulnerability in fluxcd flux2, published on 6 May 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-24817 and fix it if it is affected.\n\nWhat it is: CVE-2022-24817 is a critical code injection vulnerability in fluxcd flux2, published on 6 May 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-24817 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/fluxcd/flux2 (Go): affected from 0.1.0; fixed in 0.29.0\n- github.com/fluxcd/flux2 (Go): affected from 0.1.0; fixed in 0.29.0\n- flux (Bitnami): affected from 0.1.0; fixed in 0.29.0\n- kustomize (Bitnami): affected from 0.1.0; fixed in 0.23.0\n- github.com/fluxcd/helm-controller (Go): affected from 0.2.0; fixed in 0.19.0\n- github.com/fluxcd/helm-controller (Go): affected from 0.2.0; fixed in 0.19.0\n- github.com/fluxcd/kustomize-controller (Go): affected from 0.1.0; fixed in 0.23.0\n- github.com/fluxcd/kustomize-controller (Go): affected from 0.1.0; fixed in 0.23.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-24817/ (Markdown: https://insights.sbomify.com/CVE-2022-24817/index.md)","id":"CVE-2022-24817","markdown":"https://insights.sbomify.com/CVE-2022-24817/index.md","name":"CVE-2022-24817","record":{"aliases":["BIT-flux-2022-24817","BIT-kustomize-2022-24817","GHSA-vvmq-fwmg-2gjc"],"analysis":{"component_type":"cloud_service","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Kubernetes continuous delivery","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code and escalate privileges by submitting malicious kubeconfig files to Flux2 controllers.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"flux2","vendor":"fluxcd"},{"product":"helm-controller","vendor":"fluxcd"},{"product":"kustomize-controller","vendor":"fluxcd"}],"cvss":{"score":9.9,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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","ecosystems":["Bitnami","Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Improper kubeconfig validation allows arbitrary code execution","id":"CVE-2022-24817","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"code_injection","year":"2022"},"n_packages":8,"n_references":1,"next":{"headline":"Unchecked JNDI lookups in GeoTools","id":"CVE-2022-24818"},"packages":[{"ecosystem":"Bitnami","fixed":["0.29.0"],"introduced":["0.1.0"],"last_affected":[],"package":"flux","purl":"pkg:bitnami/flux","source":"BIT-flux-2022-24817"},{"ecosystem":"Bitnami","fixed":["0.23.0"],"introduced":["0.1.0"],"last_affected":[],"package":"kustomize","purl":"pkg:bitnami/kustomize","source":"BIT-kustomize-2022-24817"},{"ecosystem":"Go","fixed":["0.29.0"],"introduced":["0.1.0"],"last_affected":[],"package":"github.com/fluxcd/flux2","purl":null,"source":"GHSA-vvmq-fwmg-2gjc"},{"ecosystem":"Go","fixed":["0.29.0"],"introduced":["0.1.0"],"last_affected":[],"package":"github.com/fluxcd/flux2","purl":"pkg:golang/github.com/fluxcd/flux2","source":"GHSA-vvmq-fwmg-2gjc"},{"ecosystem":"Go","fixed":["0.19.0"],"introduced":["0.2.0"],"last_affected":[],"package":"github.com/fluxcd/helm-controller","purl":null,"source":"GHSA-vvmq-fwmg-2gjc"},{"ecosystem":"Go","fixed":["0.19.0"],"introduced":["0.2.0"],"last_affected":[],"package":"github.com/fluxcd/helm-controller","purl":"pkg:golang/github.com/fluxcd/helm-controller","source":"GHSA-vvmq-fwmg-2gjc"},{"ecosystem":"Go","fixed":["0.23.0"],"introduced":["0.1.0"],"last_affected":[],"package":"github.com/fluxcd/kustomize-controller","purl":null,"source":"GHSA-vvmq-fwmg-2gjc"},{"ecosystem":"Go","fixed":["0.23.0"],"introduced":["0.1.0"],"last_affected":[],"package":"github.com/fluxcd/kustomize-controller","purl":"pkg:golang/github.com/fluxcd/kustomize-controller","source":"GHSA-vvmq-fwmg-2gjc"}],"prev":{"headline":"OSGeo GeoServer JAI-EXT Code Injection","id":"CVE-2022-24816"},"products":["flux2"],"published":"2022-05-06","related":[{"cvss_score":9.9,"headline":"Improper path handling in kustomization files allows path traversal","id":"CVE-2022-24877","kev_date_added":null,"published":"2022-05-06"},{"cvss_score":7.7,"headline":"Flux2 Helm Controller denial of service","id":"CVE-2022-36049","kev_date_added":null,"published":"2022-09-07"},{"cvss_score":7.7,"headline":"Flux CLI Workload Injection","id":"CVE-2022-36035","kev_date_added":null,"published":"2022-08-31"},{"cvss_score":7.7,"headline":"Improper path handling in Kustomization files allows for denial of service","id":"CVE-2022-24878","kev_date_added":null,"published":"2022-05-06"},{"cvss_score":5,"headline":"Flux2 vulnerable to Denial of Service due to Improper use of metav1.Duration","id":"CVE-2022-39272","kev_date_added":null,"published":"2022-10-21"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["fluxcd"]},"summary":"Attackers can execute arbitrary code and escalate privileges by submitting malicious kubeconfig files to Flux2 controllers.","url":"https://insights.sbomify.com/CVE-2022-24817/"}