// For flags

CVE-2022-24817

Improper kubeconfig validation allows arbitrary code execution

Severity Score

9.9
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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

Flux2 es una solución de entrega continua abierta y extensible para Kubernetes. Las versiones de Flux2 entre 0.1.0 y 0.29.0, helm-controller versiones 0.1.0 a v0.19.0, y kustomize-controller versiones 0.1.0 a v0.23.0 son vulnerables a la inyección de código por medio de un Kubeconfig malicioso. En los despliegues multi-tenancy esto también puede conllevar una escalada de privilegios si la cuenta de servicio del controlador presenta permisos elevados. Las mitigaciones incluyen deshabilitar la funcionalidad por medio de los webhooks de Comprobación de Admisión restringiendo a los usuarios la configuración del campo "spec.kubeConfig" en los objetos Flux "Kustomization" y "HelmRelease". Las mitigaciones adicionales incluyen la aplicación de perfiles restrictivos de AppArmor y SELinux en el pod del controlador para limitar los binarios que pueden ejecutarse. Esta vulnerabilidad está corregida en kustomize-controller versión v0.23.0 y helm-controller versión v0.19.0, ambos incluidos en flux2 versión v0.29.0

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
Single
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-02-10 CVE Reserved
  • 2022-05-06 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-12-17 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-94: Improper Control of Generation of Code ('Code Injection')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Fluxcd
Search vendor "Fluxcd"
Flux2
Search vendor "Fluxcd" for product "Flux2"
>= 0.1.0 < 0.29.0
Search vendor "Fluxcd" for product "Flux2" and version " >= 0.1.0 < 0.29.0"
-
Affected
Fluxcd
Search vendor "Fluxcd"
Helm-controller
Search vendor "Fluxcd" for product "Helm-controller"
>= 0.2.0 < 0.19.0
Search vendor "Fluxcd" for product "Helm-controller" and version " >= 0.2.0 < 0.19.0"
-
Affected
Fluxcd
Search vendor "Fluxcd"
Kustomize-controller
Search vendor "Fluxcd" for product "Kustomize-controller"
>= 0.1.0 < 0.23.0
Search vendor "Fluxcd" for product "Kustomize-controller" and version " >= 0.1.0 < 0.23.0"
-
Affected