Improper Authorization Affecting github.com/kyverno/kyverno/pkg/webhooks/resource package, versions <1.10.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMKYVERNOKYVERNOPKGWEBHOOKSRESOURCE-5664728
  • published2 Jun 2023
  • disclosed2 Jun 2023
  • creditbburky

Introduced: 2 Jun 2023

CVE-2023-34091  (opens in a new tab)
CWE-285  (opens in a new tab)

How to fix?

Upgrade github.com/kyverno/kyverno/pkg/webhooks/resource to version 1.10.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Authorization such that 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.

Note:

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.

CVSS Base Scores

version 3.1