# CVE-2022-39272: Flux2 vulnerable to Denial of Service due to Improper use of metav1.Duration

> Attackers with object modification permissions can cause denial of service in Flux by providing invalid duration values, requiring an upgrade to fix.

- **Severity:** Medium 5.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Oct 2022
- **Updated:** 23 Apr 2025
- **Also known as:** BIT-flux-2022-39272, BIT-kustomize-2022-39272, GHSA-f4p5-x4vc-mh4v, GO-2022-1071

## What is CVE-2022-39272?

CVE-2022-39272 is a medium-severity denial of service vulnerability in fluxcd flux2, published on 21 Oct 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-1284 (Improper Validation of Specified Quantity in Input)

## Which versions are affected by CVE-2022-39272?

34 open source packages ship an affected version, including github.com/fluxcd/flux2, flux and kustomize. It affects 7 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/fluxcd/flux2` | Go | From 0.1.0 | 0.35.0 |
| `github.com/fluxcd/flux2` | Go | From 0.1.0 | 0.35.0 |
| `flux` | Bitnami | From 0.1.0 | 0.35.0 |
| `kustomize` | Bitnami | From 0.0.2 | 0.29.0 |
| `github.com/fluxcd/helm-controller` | Go | From 0.0.1-alpha-1 | 0.24.0 |
| `github.com/fluxcd/helm-controller` | Go | From 0.0.1-alpha-1 | 0.24.0 |
| `github.com/fluxcd/helm-controller/api` | Go | All versions | 0.26.0 |
| `github.com/fluxcd/helm-controller/api` | Go | All versions | 0.26.0 |
| `github.com/fluxcd/helm-controller/api` | Go | All versions | 0.26.0 |
| `github.com/fluxcd/image-automation-controller` | Go | From 0.1.0 | 0.26.0 |
| `github.com/fluxcd/image-automation-controller` | Go | From 0.1.0 | 0.26.0 |
| `github.com/fluxcd/image-automation-controller/api` | Go | All versions | 0.26.1 |
| `github.com/fluxcd/image-automation-controller/api` | Go | All versions | 0.26.1 |
| `github.com/fluxcd/image-automation-controller/api` | Go | All versions | 0.26.1 |
| `github.com/fluxcd/image-reflector-controller` | Go | From 0.1.0 | 0.22.0 |
| `github.com/fluxcd/image-reflector-controller` | Go | From 0.1.0 | 0.22.0 |
| `github.com/fluxcd/image-reflector-controller/api` | Go | All versions | 0.22.1 |
| `github.com/fluxcd/image-reflector-controller/api` | Go | All versions | 0.22.1 |
| `github.com/fluxcd/image-reflector-controller/api` | Go | All versions | 0.22.1 |
| `github.com/fluxcd/kustomize-controller` | Go | From 0.0.1-alpha-1 | 0.29.0 |
| `github.com/fluxcd/kustomize-controller` | Go | From 0.0.1-alpha-1 | 0.29.0 |
| `github.com/fluxcd/kustomize-controller/api` | Go | All versions | 0.30.0 |
| `github.com/fluxcd/kustomize-controller/api` | Go | All versions | 0.30.0 |
| `github.com/fluxcd/kustomize-controller/api` | Go | All versions | 0.30.0 |
| `github.com/fluxcd/notification-controller` | Go | From 0.0.1-alpha-1 | 0.27.0 |
| `github.com/fluxcd/notification-controller` | Go | From 0.0.1-alpha-1 | 0.27.0 |
| `github.com/fluxcd/notification-controller/api` | Go | All versions | 0.28.0 |
| `github.com/fluxcd/notification-controller/api` | Go | All versions | 0.28.0 |
| `github.com/fluxcd/notification-controller/api` | Go | All versions | 0.28.0 |
| `github.com/fluxcd/source-controller` | Go | From 0.0.1-alpha-1 | 0.30.0 |
| `github.com/fluxcd/source-controller` | Go | From 0.0.1-alpha-1 | 0.30.0 |
| `github.com/fluxcd/source-controller/api` | Go | All versions | 0.30.0 |
| `github.com/fluxcd/source-controller/api` | Go | All versions | 0.30.0 |
| `github.com/fluxcd/source-controller/api` | Go | All versions | 0.30.0 |

Products: Fluxcd Flux2, Fluxcd Helm-Controller, Fluxcd Image-Automation-Controller, Fluxcd Image-Reflector-Controller, Fluxcd Kustomize-Controller, Fluxcd Notification-Controller, Fluxcd Source-Controller.

## How do I fix CVE-2022-39272?

Upgrade github.com/fluxcd/flux2 to 0.35.0 or later.

## Is CVE-2022-39272 being exploited?

There is no known exploitation of CVE-2022-39272 in the wild and no public exploit code.

## Other vulnerabilities in fluxcd flux2

- [CVE-2022-24817](https://insights.sbomify.com/CVE-2022-24817/): Improper kubeconfig validation allows arbitrary code execution (critical 9.9)
- [CVE-2022-24877](https://insights.sbomify.com/CVE-2022-24877/): Improper path handling in kustomization files allows path traversal (critical 9.9)
- [CVE-2022-36049](https://insights.sbomify.com/CVE-2022-36049/): Flux2 Helm Controller denial of service (high 7.7)
- [CVE-2022-36035](https://insights.sbomify.com/CVE-2022-36035/): Flux CLI Workload Injection (high 7.7)
- [CVE-2022-24878](https://insights.sbomify.com/CVE-2022-24878/): Improper path handling in Kustomization files allows for denial of service (high 7.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-39272 and fix it if it is affected.

What it is: CVE-2022-39272 is a medium-severity denial of service vulnerability in fluxcd flux2, published on 21 Oct 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-39272 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/fluxcd/flux2 (Go): affected from 0.1.0; fixed in 0.35.0
- github.com/fluxcd/flux2 (Go): affected from 0.1.0; fixed in 0.35.0
- flux (Bitnami): affected from 0.1.0; fixed in 0.35.0
- kustomize (Bitnami): affected from 0.0.2; fixed in 0.29.0
- github.com/fluxcd/helm-controller (Go): affected from 0.0.1-alpha-1; fixed in 0.24.0
- github.com/fluxcd/helm-controller (Go): affected from 0.0.1-alpha-1; fixed in 0.24.0
- github.com/fluxcd/helm-controller/api (Go): affected all versions; fixed in 0.26.0
- github.com/fluxcd/helm-controller/api (Go): affected all versions; fixed in 0.26.0
- github.com/fluxcd/helm-controller/api (Go): affected all versions; fixed in 0.26.0
- github.com/fluxcd/image-automation-controller (Go): affected from 0.1.0; fixed in 0.26.0
- github.com/fluxcd/image-automation-controller (Go): affected from 0.1.0; fixed in 0.26.0
- github.com/fluxcd/image-automation-controller/api (Go): affected all versions; fixed in 0.26.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-39272/ (Markdown: https://insights.sbomify.com/CVE-2022-39272/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-39272
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-39272
- OSV: https://osv.dev/vulnerability/CVE-2022-39272

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-39272/
Summaries are generated and may contain mistakes; the official description above is the record.
