CVE-2022-24878: Github.com/fluxcd/kustomize controller Denial of Service Vulnerability
HIGHCVE-2022-24878 is a HIGH (CVSS 7.7) denial of service vulnerability (CWE-674: Uncontrolled Recursion) affecting Github.com/fluxcd/kustomize controller libraries in the Go ecosystem. The issue involves improper path handling in kustomization files allows for denial of service. Remediation is available by upgrading affected packages to version 0.24.0, 0.29.0.
CVE-2022-24878 at a Glance
Security Impact
CVSS: 7.7
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:H).
How to Fix CVE-2022-24878
To remediate this vulnerability, upgrade all affected Github.com/fluxcd/kustomize controller 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/kustomize-controller to 0.24.0
Upgrade github.com/fluxcd/flux2 to 0.29.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/kustomize-controller
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-24878, inspect your project dependencies for Github.com/fluxcd/kustomize controller:
inspect dependencies for github.com/fluxcd/kustomize-controller
Analyze the terminal output to locate any version of Github.com/fluxcd/kustomize controller in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.24.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-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Github.com/fluxcd/kustomize controller, 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-24878 Affected Github.com/fluxcd/kustomize controller Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/fluxcd/kustomize-controller
|
Go |
≥ 0.16.0
< 0.24.0
|
0.24.0
|
|
github.com/fluxcd/flux2
|
Go |
≥ 0.19.0
< 0.29.0
|
0.29.0
|
References
Frequently Asked Questions
What is CVE-2022-24878?
Which Github.com/fluxcd/kustomize controller versions are affected?
What version fixes CVE-2022-24878?
Is github.com/fluxcd/kustomize-controller affected?
Is github.com/fluxcd/flux2 affected?
What is the CVSS score of CVE-2022-24878?
What CWE is associated with CVE-2022-24878?
How can I check Go dependencies for CVE-2022-24878?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7pwf-jg34-hxwp",
"modified" : "2022-05-20T16:58:38Z",
"published" : "2022-05-20T16:58:38Z",
"aliases" : [ "CVE-2022-24878" ],
"summary" : "Improper path handling in Kustomization files allows for denial of service",
"details" : "The kustomize-controller enables the use of Kustomize’s functionality when applying Kubernetes declarative state onto a cluster. A malicious user can use a specially crafted `kustomization.yaml` to cause Denial of Service at controller level.\n\nIn multi-tenancy deployments this can lead to multiple tenants not being able to apply their Kustomizations until the malicious `kustomization.yaml` is removed and the controller restarted.\n\n### Impact\n\nWithin the affected versions, users with write access to a Flux source are able to craft a malicious `kustomization.yaml` file which causes the controller to enter an endless loop.\n\n### Patches\n\nThis vulnerability was fixed in kustomize-controller v0.24.0 and included in flux2 v0.29.0 released on 2022-04-20. The changes introduce better handling of Kustomization files blocking references that could lead to endless loops.\n\n### Credits\n\nThe Flux engineering team found and patched this vulnerability.\n\n### For more information\n\nIf you have any questions or comments about this advisory please open an issue in the [flux2 repository](http://github.com/fluxcd/flux2).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/kustomize-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.16.0"
}, {
"fixed" : "0.24.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/fluxcd/flux2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.19.0"
}, {
"fixed" : "0.29.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/fluxcd/flux2/security/advisories/GHSA-7pwf-jg34-hxwp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24878"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fluxcd/flux2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-05-20T16:58:38Z",
"nvd_published_at" : "2022-05-06T02:15:00Z"
}
}