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

    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 ID SNYK-GOLANG-GITHUBCOMKYVERNOKYVERNOPKGVALIDATIONEXCEPTION-8310960
  • published 31 Oct 2024
  • disclosed 30 Oct 2024
  • credit Joel Eidsath

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
Expand this section

Snyk

Recommended
5.9 medium
  • Attack Vector (AV)
    Adjacent
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    Active
  • Confidentiality (VC)
    High
  • Integrity (VI)
    Low
  • Availability (VA)
    Low
  • Confidentiality (SC)
    Low
  • Integrity (SI)
    High
  • Availability (SA)
    Low