Improper Authorization Affecting github.com/kyverno/kyverno/pkg/validation/exception package, versions <1.13.0


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (16th 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 IDSNYK-GOLANG-GITHUBCOMKYVERNOKYVERNOPKGVALIDATIONEXCEPTION-8310960
  • published31 Oct 2024
  • disclosed30 Oct 2024
  • creditJoel Eidsath

Introduced: 30 Oct 2024

CVE-2024-48921  (opens in a new tab)
CWE-285  (opens in a new tab)

How to fix?

Upgrade github.com/kyverno/kyverno/pkg/validation/exception to version 1.13.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Authorization due to the default configuration that allows the creation of PolicyException objects in any namespace. An attacker with privileges to non-kyverno namespaces can bypass intended security policies by exploiting this misconfiguration.

PoC

  1. Administrator creates "disallow-privileged-containers" ClusterPolicy that applies to resources in the namespace "ubuntu-restricted"

  2. Cluster user creates a PolicyException object for "disallow-privileged-containers" in namespace "ubuntu-restricted"

  3. Cluster user creates a pod with a privileged container in "ubuntu-restricted"

  4. Cluster user escalates to root on the node from the privileged container

References

CVSS Scores

version 4.0
version 3.1