GHSA-f4p5-x4vc-mh4v

Suggest an improvement
Source
https://github.com/advisories/GHSA-f4p5-x4vc-mh4v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-f4p5-x4vc-mh4v/GHSA-f4p5-x4vc-mh4v.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-f4p5-x4vc-mh4v
Aliases
Related
Published
2022-10-19T18:40:02Z
Modified
2024-09-11T06:12:37.837743Z
Severity
  • 5.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L CVSS Calculator
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.

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
Database specific
{
    "nvd_published_at": "2022-10-22T00:15:00Z",
    "cwe_ids": [
        "CWE-20"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-10-19T18:40:02Z"
}
References

Affected packages

Go / github.com/fluxcd/flux2

Package

Name
github.com/fluxcd/flux2
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/flux2

Affected ranges

Type
SEMVER
Events
Introduced
0.1.0
Fixed
0.35.0

Go / github.com/fluxcd/source-controller

Package

Name
github.com/fluxcd/source-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/source-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.0.1-alpha-1
Fixed
0.30.0

Go / github.com/fluxcd/kustomize-controller

Package

Name
github.com/fluxcd/kustomize-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/kustomize-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.0.1-alpha-1
Fixed
0.29.0

Go / github.com/fluxcd/helm-controller

Package

Name
github.com/fluxcd/helm-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/helm-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.0.1-alpha-1
Fixed
0.24.0

Go / github.com/fluxcd/notification-controller

Package

Name
github.com/fluxcd/notification-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/notification-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.0.1-alpha-1
Fixed
0.27.0

Go / github.com/fluxcd/image-automation-controller

Package

Name
github.com/fluxcd/image-automation-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/image-automation-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.1.0
Fixed
0.26.0

Go / github.com/fluxcd/image-reflector-controller

Package

Name
github.com/fluxcd/image-reflector-controller
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/image-reflector-controller

Affected ranges

Type
SEMVER
Events
Introduced
0.1.0
Fixed
0.22.0

Go / github.com/fluxcd/helm-controller/api

Package

Name
github.com/fluxcd/helm-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/helm-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.26.0

Go / github.com/fluxcd/image-automation-controller/api

Package

Name
github.com/fluxcd/image-automation-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/image-automation-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.26.1

Go / github.com/fluxcd/image-reflector-controller/api

Package

Name
github.com/fluxcd/image-reflector-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/image-reflector-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.22.1

Go / github.com/fluxcd/kustomize-controller/api

Package

Name
github.com/fluxcd/kustomize-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/kustomize-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.30.0

Go / github.com/fluxcd/notification-controller/api

Package

Name
github.com/fluxcd/notification-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/notification-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.28.0

Go / github.com/fluxcd/source-controller/api

Package

Name
github.com/fluxcd/source-controller/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/fluxcd/source-controller/api

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.30.0