{"id":"CVE-2021-41254","published":"2021-11-12T17:45:10Z","modified":"2024-08-04T03:08:31Z","title":"Privilege escalation to cluster admin on multi-tenant environments","vendor":"fluxcd","product":"kustomize-controller","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01824,"percentile":0.79325,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7","tags":["x_refsource_CONFIRM"]}],"priority":{"score":22.0,"factors":[{"name":"EPSS percentile","points":15.87},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"fluxcd","affectedVersions":[{"vendor":"fluxcd","product":"kustomize-controller","versions":["< 0.15.0"]}],"affected":[{"ecosystem":"Go","package":"github.com/fluxcd/kustomize-controller","vulnerableRanges":["<0.15.0"],"patched":["0.15.0"],"from":["GHSA-35rf-v2jv-gfg7","GO-2022-0260"],"provenance":"source"}],"summary":{"text":"The flaw lies in kustomize-controller, the Kubernetes operator from fluxcd that runs continuous delivery pipelines for manifests assembled with Kustomize, where it allows commands to be executed inside the controller container. An authenticated user who can create Kubernetes Secrets, Service Accounts and Flux Kustomization objects, such as a non-admin tenant in a multi-tenant environment, can embed a shell script in a Secret to run kubectl under the controller's Service Account and gain cluster admin privileges.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:46:54Z"},"euvd":{"id":"EUVD-2021-2283","exploited":false,"provenance":"source"}}