5.0medium
Flux2 vulnerable to Denial of Service due to Improper use of metav1.Duration
- Severity
- 5.0medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.86% (higher than 56% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f4p5-x4vc-mh4vBIT-FLUX-2022-39272BIT-KUSTOMIZE-2022-39272GO-2022-1071
Description
Flux is an open and extensible continuous delivery solution for Kubernetes. Versions prior to 0.35.0 are subject to a Denial of Service. 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. This issue is patched in version 0.35.0. As a workaround, Admission 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| fluxcd flux2 | < 0.35.0, from 0.1.0 before 0.35.0 | CVE List, NVD |
| github.com/fluxcd/flux2 (Go) | from 0.1.0 before 0.35.0 | GitHub Advisory Database |
| github.com/fluxcd/source-controller (Go) | from 0.0.1-alpha-1 before 0.30.0 | GitHub Advisory Database |
| github.com/fluxcd/kustomize-controller (Go) | from 0.0.1-alpha-1 before 0.29.0 | GitHub Advisory Database |
| github.com/fluxcd/helm-controller (Go) | from 0.0.1-alpha-1 before 0.24.0 | GitHub Advisory Database |
| github.com/fluxcd/notification-controller (Go) | from 0.0.1-alpha-1 before 0.27.0 | GitHub Advisory Database |
| github.com/fluxcd/image-automation-controller (Go) | from 0.1.0 before 0.26.0 | GitHub Advisory Database |
| github.com/fluxcd/image-reflector-controller (Go) | from 0.1.0 before 0.22.0 | GitHub Advisory Database |
| github.com/fluxcd/helm-controller/api (Go) | before 0.26.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/fluxcd/image-automation-controller/api (Go) | before 0.26.1 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/fluxcd/image-reflector-controller/api (Go) | before 0.22.1 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/fluxcd/kustomize-controller/api (Go) | before 0.30.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/fluxcd/notification-controller/api (Go) | before 0.28.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/fluxcd/source-controller/api (Go) | before 0.30.0 | GitHub Advisory Database, Go Vulnerability Database |
| fluxcd helm-controller | from 0.0.2 before 0.24.0, 0.0.1 | NVD |
| fluxcd image-automation-controller | from 0.1.0 before 0.26.0 | NVD |
| fluxcd image-reflector-controller | from 0.1.0 before 0.22.0 | NVD |
| fluxcd kustomize-controller | from 0.0.2 before 0.29.0, 0.0.1 | NVD |
| fluxcd notification-controller | from 0.0.2 before 0.27.0, 0.0.1 | NVD |
| fluxcd source-controller | from 0.0.2 before 0.30.0, 0.0.1 | NVD |
| flux (Bitnami) | from 0.1.0 before 0.35.0 | Bitnami Vulnerability Database |
| kustomize (Bitnami) | from 0.0.2 before 0.29.0 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 5.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L |
| GitHub | 5.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L |
| NVD | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L |
| Bitnami Vulnerability Database | medium rating |
Classification
What each source says
CVE List
Flux is an open and extensible continuous delivery solution for Kubernetes. Versions prior to 0.35.0 are subject to a Denial of Service. 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. This issue is patched in version 0.35.0. As a workaround, Admission 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.
GitHub Advisory Database
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.
The 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; b) lack of validation within Flux to restrict allowed values.
Workarounds
Admission 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.
Credits
This issue was reported by Alexander Block (@codablock) through the Flux security mailing list (as recommended).
For more information
If you have any questions or comments about this advisory:
- Open an issue in any of the affected repositories.
- Contact us at the CNCF Flux channel.
References
Go Vulnerability Database
Flux controllers 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.
The issue has two root causes: a) the Kubernetes type metav1.Duration is not fully compatible with the Go type time.Duration as explained in https://github.com/kubernetes/apimachinery/issues/131, and b) a lack of validation within Flux to restrict allowed values.
NVD (es)
Flux es una solución de entrega continua abierta y extensible para Kubernetes. Las versiones anteriores a 0.35.0, están sujetas a una denegación de servicio. Los usuarios que presentan permisos para cambiar los objetos de Flux, ya sea medainyte una fuente de Flux o directamente dentro de un clúster, pueden proporcionar datos no válidos a los campos ".spec.interval" o ".spec.timeout" (y variaciones estructuradas de estos campos), causando que todo el tipo de objeto deje de ser procesado. Este problema ha sido corregido en versión 0.35.0. Como mitigación, pueden emplearse controladores de admisión para restringir los valores que pueden usarse para los campos ".spec.interval" y ".spec.timeout", aunque la actualización a las últimas versiones sigue siendo la mitigación recomendada
References
| https://github.com/fluxcd/flux2/security/advisories/GHSA-f4p5-x4vc-mh4v | advisory, third-party-advisory, web | |
| https://github.com/kubernetes/apimachinery/issues/131 | advisory, issue-tracking, patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-39272 | advisory, web | |
| https://github.com/fluxcd/helm-controller/pull/533 | fix, web | |
| https://github.com/fluxcd/image-automation-controller/pull/439 | fix, web | |
| https://github.com/fluxcd/image-reflector-controller/pull/314 | fix, web | |
| https://github.com/fluxcd/kustomize-controller/pull/731 | fix, web | |
| https://github.com/fluxcd/notification-controller/pull/420 | fix, web | |
| https://github.com/fluxcd/source-controller/pull/903 | fix, web | |
| https://github.com/fluxcd/flux2 | package | |
| https://github.com/kubernetes/apimachinery#131 | web | |
| https://pkg.go.dev/vuln/GO-2022-1071 | web | |
| https://github.com/advisories/GHSA-f4p5-x4vc-mh4v | advisory | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-39272 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f4p5-x4vc-mh4v changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-1071 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2022-39272 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-FLUX-2022-39272 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-KUSTOMIZE-2022-39272 changed 2026-09-08 | Apache-2.0 |