ghsa-j77r-2fxf-5jrw
Vulnerability from github
The kustomize-controller enables the use of Kustomize’s functionality when applying Kubernetes declarative state onto a cluster. A malicious user can use built-in features and a specially crafted kustomization.yaml
to expose sensitive data from the controller’s pod filesystem. In multi-tenancy deployments this can lead to privilege escalation if the controller's service account has elevated permissions.
Within the affected versions, users with write access to a Flux source are able to use built-in features to expose sensitive data from the controller’s pod filesystem using a malicious kustomization.yaml
file.
This vulnerability was fixed in kustomize-controller v0.24.0 and included in flux2 v0.29.0 released on 2022-04-20. The changes introduce a new Kustomize file system implementation which ensures that all files being handled are contained within the Kustomization working directory, blocking references to any files that do not meet that requirement.
Automated tooling (e.g. conftest) could be employed as a workaround, as part of a user's CI/CD pipeline to ensure that their kustomization.yaml
files conform with specific policies, blocking access to sensitive path locations.
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/kustomize-controller" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.24.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/flux2" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.29.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-24877" ], "database_specific": { "cwe_ids": [ "CWE-22" ], "github_reviewed": true, "github_reviewed_at": "2022-05-04T18:04:07Z", "nvd_published_at": "2022-05-06T01:15:00Z", "severity": "CRITICAL" }, "details": "The kustomize-controller enables the use of Kustomize\u2019s functionality when applying Kubernetes declarative state onto a cluster. A malicious user can use built-in features and a specially crafted `kustomization.yaml` to expose sensitive data from the controller\u2019s pod filesystem. In multi-tenancy deployments this can lead to privilege escalation if the controller\u0027s service account has elevated permissions.\n\nWithin the affected versions, users with write access to a Flux source are able to use built-in features to expose sensitive data from the controller\u2019s pod filesystem using a malicious `kustomization.yaml` file.\n\nThis vulnerability was fixed in kustomize-controller v0.24.0 and included in flux2 v0.29.0 released on 2022-04-20. The changes introduce a new Kustomize file system implementation which ensures that all files being handled are contained within the Kustomization working directory, blocking references to any files that do not meet that requirement.\n\nAutomated tooling (e.g. conftest) could be employed as a workaround, as part of a user\u0027s CI/CD pipeline to ensure that their `kustomization.yaml` files conform with specific policies, blocking access to sensitive path locations.", "id": "GHSA-j77r-2fxf-5jrw", "modified": "2022-06-02T17:41:47Z", "published": "2022-05-04T18:04:07Z", "references": [ { "type": "WEB", "url": "https://github.com/fluxcd/flux2/security/advisories/GHSA-j77r-2fxf-5jrw" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24877" }, { "type": "WEB", "url": "https://github.com/fluxcd/kustomize-controller/commit/f4528fb25d611da94e491346bea056d5c5c3611f" }, { "type": "WEB", "url": "https://github.com/fluxcd/pkg/commit/0ec014baf417fd3879d366a45503a548b9267d2a" }, { "type": "PACKAGE", "url": "github.com/fluxcd/kustomize-controller" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "type": "CVSS_V3" } ], "summary": "Improper path handling in kustomization files allows path traversal" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.