High severity · published Nov 12, 2021
CVE-2021-41254
kustomize-controller is a Kubernetes operator, specialized in running continuous delivery pipelines for infrastructure and workloads defined with Kubernetes manifests and…
8.8
CVSS
1.8%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)1.8% · higher than 79% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KU
Kustomize-controller · Fluxcd
before 0.15.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-41254
CVE.org
https://www.cve.org/CVERecord?id=CVE-2021-41254
Exploit
https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7
More from Kustomize-controller
9.9
CVE-2022-24817
Flux2 is an open and extensible continuous delivery solution for Kubernetes
8.8
CVE-2022-24877
Flux is an open and extensible continuous delivery solution for Kubernetes
6.5
CVE-2022-24878
Flux is an open and extensible continuous delivery solution for Kubernetes
4.3
CVE-2022-39272
Flux2 vulnerable to Denial of Service due to Improper use of metav1.Duration
