CVE-2021-41254

kustomize-controller is a Kubernetes operator, specialized in running continuous delivery pipelines for infrastructure and workloads defined with Kubernetes manifests and assembled with Kustomize. Users that can create Kubernetes Secrets, Service Accounts and Flux Kustomization objects, could execute commands inside the kustomize-controller container by embedding a shell script in a Kubernetes Secret. This can be used to run `kubectl` commands under the Service Account of kustomize-controller, thus allowing an authenticated Kubernetes user to gain cluster admin privileges. In affected versions multitenant environments where non-admin users have permissions to create Flux Kustomization objects are affected by this issue. This vulnerability was fixed in kustomize-controller v0.15.0 (included in flux2 v0.18.0) released on 2021-10-08. Starting with v0.15, the kustomize-controller no longer executes shell commands on the container OS and the `kubectl` binary has been removed from the container image. To prevent the creation of Kubernetes Service Accounts with `secrets` in namespaces owned by tenants, a Kubernetes validation webhook such as Gatekeeper OPA or Kyverno can be used.
References
Configurations

Configuration 1 (hide)

cpe:2.3:a:fluxcd:kustomize-controller:*:*:*:*:*:*:*:*

History

17 Nov 2021, 13:29

Type Values Removed Values Added
References (CONFIRM) https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7 - (CONFIRM) https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7 - Exploit, Mitigation, Third Party Advisory
CPE cpe:2.3:a:fluxcd:kustomize-controller:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : 8.8
v2 : 9.0
v3 : 8.8

12 Nov 2021, 18:15

Type Values Removed Values Added
New CVE

Information

Published : 2021-11-12 18:15

Updated : 2023-12-10 14:09


NVD link : CVE-2021-41254

Mitre link : CVE-2021-41254

CVE.ORG link : CVE-2021-41254


JSON object : View

Products Affected

fluxcd

  • kustomize-controller
CWE
CWE-78

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')