CVE-2022-39272
JSON

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 packageVersionsReported by
fluxcd flux2< 0.35.0, from 0.1.0 before 0.35.0CVE List, NVD
github.com/fluxcd/flux2 (Go)from 0.1.0 before 0.35.0GitHub Advisory Database
github.com/fluxcd/source-controller (Go)from 0.0.1-alpha-1 before 0.30.0GitHub Advisory Database
github.com/fluxcd/kustomize-controller (Go)from 0.0.1-alpha-1 before 0.29.0GitHub Advisory Database
github.com/fluxcd/helm-controller (Go)from 0.0.1-alpha-1 before 0.24.0GitHub Advisory Database
github.com/fluxcd/notification-controller (Go)from 0.0.1-alpha-1 before 0.27.0GitHub Advisory Database
github.com/fluxcd/image-automation-controller (Go)from 0.1.0 before 0.26.0GitHub Advisory Database
github.com/fluxcd/image-reflector-controller (Go)from 0.1.0 before 0.22.0GitHub Advisory Database
github.com/fluxcd/helm-controller/api (Go)before 0.26.0GitHub Advisory Database, Go Vulnerability Database
github.com/fluxcd/image-automation-controller/api (Go)before 0.26.1GitHub Advisory Database, Go Vulnerability Database
github.com/fluxcd/image-reflector-controller/api (Go)before 0.22.1GitHub Advisory Database, Go Vulnerability Database
github.com/fluxcd/kustomize-controller/api (Go)before 0.30.0GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L
GitHub5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L
NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Bitnami Vulnerability Databasemedium rating

Classification

CWE-20CWE-1284

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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-mh4vadvisory, third-party-advisory, web
https://github.com/kubernetes/apimachinery/issues/131advisory, issue-tracking, patch, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-39272advisory, web
https://github.com/fluxcd/helm-controller/pull/533fix, web
https://github.com/fluxcd/image-automation-controller/pull/439fix, web
https://github.com/fluxcd/image-reflector-controller/pull/314fix, web
https://github.com/fluxcd/kustomize-controller/pull/731fix, web
https://github.com/fluxcd/notification-controller/pull/420fix, web
https://github.com/fluxcd/source-controller/pull/903fix, web
https://github.com/fluxcd/flux2package
https://github.com/kubernetes/apimachinery#131web
https://pkg.go.dev/vuln/GO-2022-1071web

Related

Sources

SourceRecordLicence
CVE ListCVE-2022-39272 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-f4p5-x4vc-mh4v changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2022-1071 changed 2026-02-04CC-BY-4.0
NVDCVE-2022-39272 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-FLUX-2022-39272 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-KUSTOMIZE-2022-39272 changed 2026-09-08Apache-2.0