Vulnerabilities in pkg:golang/github.com/fluxcd/image-reflector-controller/api
PACKAGECVE-2022-39272 is a MODERATE (CVSS 5.0) denial of service vulnerability (CWE-20: Improper Input Validation) affecting Github.com/fluxcd/flux2 libraries in the Go ecosystem. The issue involves improper use of metav1.duration allows for denial of service. Remediation is available by upgrading affected packages to version 0.35.0, 0.30.0, 0.29.0, 0.24.0, 0.27.0, 0.26.0, 0.22.0, 0.26.1, 0.22.1, 0.28.0.
pkg:golang/github.com/fluxcd/image-reflector-controller/api
Vulnerability advisories affecting package pkg:golang/github.com/fluxcd/image-reflector-controller/api. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-f4p5-x4vc-mh4v | CVE-2022-39272 | MODERATE | Improper use of metav1.Duration allows for Denial of Service |
CVE-2022-39272 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L).
How to Fix CVE-2022-39272
To remediate this vulnerability, upgrade all affected Github.com/fluxcd/flux2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/fluxcd/flux2 to 0.35.0
Upgrade github.com/fluxcd/source-controller to 0.30.0
Upgrade github.com/fluxcd/kustomize-controller to 0.29.0
Upgrade github.com/fluxcd/helm-controller to 0.24.0
Upgrade github.com/fluxcd/notification-controller to 0.27.0
Upgrade github.com/fluxcd/image-automation-controller to 0.26.0
Upgrade github.com/fluxcd/image-reflector-controller to 0.22.0
Upgrade github.com/fluxcd/helm-controller/api to 0.26.0
Upgrade github.com/fluxcd/image-automation-controller/api to 0.26.1
Upgrade github.com/fluxcd/image-reflector-controller/api to 0.22.1
Upgrade github.com/fluxcd/kustomize-controller/api to 0.30.0
Upgrade github.com/fluxcd/notification-controller/api to 0.28.0
Upgrade github.com/fluxcd/source-controller/api to 0.30.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/fluxcd/flux2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-39272, inspect your project dependencies for Github.com/fluxcd/flux2:
inspect dependencies for github.com/fluxcd/flux2
Analyze the terminal output to locate any version of Github.com/fluxcd/flux2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.35.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/fluxcd/flux2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-39272 Affected Github.com/fluxcd/flux2 Versions
13 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/fluxcd/flux2
|
Go |
≥ 0.1.0
< 0.35.0
|
0.35.0
|
|
github.com/fluxcd/source-controller
|
Go |
≥ 0.0.1-alpha-1
< 0.30.0
|
0.30.0
|
|
github.com/fluxcd/kustomize-controller
|
Go |
≥ 0.0.1-alpha-1
< 0.29.0
|
0.29.0
|
|
github.com/fluxcd/helm-controller
|
Go |
≥ 0.0.1-alpha-1
< 0.24.0
|
0.24.0
|
|
github.com/fluxcd/notification-controller
|
Go |
≥ 0.0.1-alpha-1
< 0.27.0
|
0.27.0
|
|
github.com/fluxcd/image-automation-controller
|
Go |
≥ 0.1.0
< 0.26.0
|
0.26.0
|
|
github.com/fluxcd/image-reflector-controller
|
Go |
≥ 0.1.0
< 0.22.0
|
0.22.0
|
|
github.com/fluxcd/helm-controller/api
|
Go |
< 0.26.0
|
0.26.0
|
|
github.com/fluxcd/image-automation-controller/api
|
Go |
< 0.26.1
|
0.26.1
|
|
github.com/fluxcd/image-reflector-controller/api
|
Go |
< 0.22.1
|
0.22.1
|
|
github.com/fluxcd/kustomize-controller/api
|
Go |
< 0.30.0
|
0.30.0
|
|
github.com/fluxcd/notification-controller/api
|
Go |
< 0.28.0
|
0.28.0
|
|
github.com/fluxcd/source-controller/api
|
Go |
< 0.30.0
|
0.30.0
|
References
Frequently Asked Questions
What is CVE-2022-39272?
Which Github.com/fluxcd/flux2 versions are affected?
What version fixes CVE-2022-39272?
Is github.com/fluxcd/flux2 affected?
Is github.com/fluxcd/source-controller affected?
What is the CVSS score of CVE-2022-39272?
What CWE is associated with CVE-2022-39272?
How can I check Go dependencies for CVE-2022-39272?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f4p5-x4vc-mh4v",
"modified" : "2024-05-20T21:35:10Z",
"published" : "2022-10-19T18:40:02Z",
"aliases" : [ "CVE-2022-39272" ],
"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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/flux2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "0.35.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/source-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1-alpha-1"
}, {
"fixed" : "0.30.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/kustomize-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1-alpha-1"
}, {
"fixed" : "0.29.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/helm-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1-alpha-1"
}, {
"fixed" : "0.24.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/notification-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1-alpha-1"
}, {
"fixed" : "0.27.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/image-automation-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "0.26.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/image-reflector-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "0.22.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/helm-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.26.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/image-automation-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.26.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/image-reflector-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.22.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/kustomize-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.30.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/notification-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.28.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/source-controller/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.30.0"
} ]
} ]
} ],
"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"
} ],
"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"
}
}