Skip to content

Kyverno resource with a deletionTimestamp may allow policy circumvention

Moderate severity GitHub Reviewed Published Jun 1, 2023 in kyverno/kyverno • Updated Nov 11, 2023

Package

gomod github.com/kyverno/kyverno (Go)

Affected versions

< 1.10.0

Patched versions

1.10.0

Description

Impact

In versions of Kyverno prior to 1.10.0, resources which have the deletionTimestamp field defined can bypass validate, generate, or mutate-existing policies, even in cases where the validationFailureAction field is set to Enforce.

This situation occurs as resources pending deletion were being consciously exempted by Kyverno, as a way to reduce processing load as policies are typically not applied to objects which are being deleted.

However, this could potentially result in allowing a malicious user to leverage the Kubernetes finalizers feature by setting a finalizer which causes the Kubernetes API server to set the deletionTimestamp and then not completing the delete operation as a way to explicitly to bypass a Kyverno policy.

Note that this is not applicable to Kubernetes Pods but, as an example, a Kubernetes Service resource can be manipulated using an indefinite finalizer to bypass policies.

Patches

This is resolved in Kyverno 1.10.0.

Workarounds

There is no known workaround.

References

Are there any links users can visit to find out more?

References

@chipzoller chipzoller published to kyverno/kyverno Jun 1, 2023
Published by the National Vulnerability Database Jun 1, 2023
Published to the GitHub Advisory Database Jun 5, 2023
Reviewed Jun 5, 2023
Last updated Nov 11, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

EPSS score

0.046%
(18th percentile)

Weaknesses

CVE ID

CVE-2023-34091

GHSA ID

GHSA-hq4m-4948-64cc

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.