{"id":"GHSA-f4p5-x4vc-mh4v","summary":"Improper use of metav1.Duration allows for Denial of Service","details":"Flux controllers within the affected versions range are vulnerable to a denial of service attack. Users that have permissions to change Flux’s objects, either through a Flux source or directly within a cluster, can provide invalid data to fields `.spec.interval` or `.spec.timeout` (and structured variations of these fields), causing the entire object type to stop being processed.\n\nThe issue has two root causes: a) the Kubernetes type `metav1.Duration` not being fully compatible with the Go type `time.Duration` as explained on [upstream report](https://github.com/kubernetes/apimachinery/issues/131); b) lack of validation within Flux to restrict allowed values.\n\n### Workarounds\n\nAdmission controllers can be employed to restrict the values that can be used for fields `.spec.interval` and `.spec.timeout`, however upgrading to the latest versions is still the recommended mitigation.\n\n### Credits\n\nThis issue was reported by Alexander Block (@codablock) through the Flux security mailing list (as [recommended](https://fluxcd.io/security/#report-a-vulnerability)).\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in any of the affected repositories.\n- Contact us at the CNCF Flux channel.\n\n### References\n\n- https://github.com/kubernetes/apimachinery/issues/131\n\n","aliases":["BIT-flux-2022-39272","BIT-kustomize-2022-39272","CVE-2022-39272","GO-2022-1071"],"modified":"2026-09-10T03:49:46.466771528Z","published":"2022-10-19T18:40:02Z","database_specific":{"cwe_ids":["CWE-20"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-10-19T18:40:02Z","nvd_published_at":"2022-10-22T00:15:00Z"},"references":[{"type":"WEB","url":"https://github.com/fluxcd/flux2/security/advisories/GHSA-f4p5-x4vc-mh4v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39272"},{"type":"WEB","url":"https://github.com/kubernetes/apimachinery/issues/131"},{"type":"WEB","url":"https://github.com/fluxcd/helm-controller/pull/533"},{"type":"WEB","url":"https://github.com/fluxcd/image-automation-controller/pull/439"},{"type":"WEB","url":"https://github.com/fluxcd/image-reflector-controller/pull/314"},{"type":"WEB","url":"https://github.com/fluxcd/kustomize-controller/pull/731"},{"type":"WEB","url":"https://github.com/fluxcd/notification-controller/pull/420"},{"type":"WEB","url":"https://github.com/fluxcd/source-controller/pull/903"},{"type":"PACKAGE","url":"https://github.com/fluxcd/flux2"},{"type":"WEB","url":"https://github.com/kubernetes/apimachinery#131"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2022-1071"}],"affected":[{"package":{"name":"github.com/fluxcd/flux2","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/flux2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.1.0"},{"fixed":"0.35.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/source-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/source-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.1-alpha-1"},{"fixed":"0.30.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/kustomize-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/kustomize-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.1-alpha-1"},{"fixed":"0.29.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/helm-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/helm-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.1-alpha-1"},{"fixed":"0.24.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/notification-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/notification-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.1-alpha-1"},{"fixed":"0.27.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/image-automation-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/image-automation-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.1.0"},{"fixed":"0.26.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/image-reflector-controller","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/image-reflector-controller"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.1.0"},{"fixed":"0.22.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/helm-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/helm-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.26.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/image-automation-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/image-automation-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.26.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/image-reflector-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/image-reflector-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.22.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/kustomize-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/kustomize-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.30.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/notification-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/notification-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.28.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}},{"package":{"name":"github.com/fluxcd/source-controller/api","ecosystem":"Go","purl":"pkg:golang/github.com/fluxcd/source-controller/api"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.30.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L"}]}