CVE-2022-39272: Flux2 vulnerable to Denial of Service due to Improper use of metav1.Duration
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
- https://github.com/kubernetes/apimachinery/issues/131
Other sources
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.
— NVD
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 Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is CVE-2022-39272?
CVE-2022-39272 is a vulnerability in Flux, an open and extensible continuous delivery solution for Kubernetes, that allows users with permissions to change Flux objects to provide invalid data and trigger a Denial of Service (DoS) attack.
What is the severity of CVE-2022-39272?
The severity of CVE-2022-39272 is medium with a CVSS score of 4.3.
Which versions of Flux are affected by CVE-2022-39272?
Versions of Flux prior to 0.35.0 are affected by CVE-2022-39272.
How can the CVE-2022-39272 vulnerability be fixed?
To fix the CVE-2022-39272 vulnerability, it is recommended to update Flux to version 0.35.0 or newer.
Where can I find more information about CVE-2022-39272?
More information about CVE-2022-39272 can be found in the advisory on the Flux GitHub security advisories page: https://github.com/fluxcd/flux2/security/advisories/GHSA-f4p5-x4vc-mh4v