CVE-2024-0793: K8s.io/kubernetes Kubernetes Nil Pointer Dereference Vulnerability

HIGH
Advisory Identifier: GHSA-h7wq-jj8r-qm7p
CVSS 7.7
CWE-20 CWE-476
Published
Advisory Summary

CVE-2024-0793 is a HIGH (CVSS 7.7) kubernetes nil pointer dereference vulnerability (CWE-20: Improper Input Validation) affecting K8s.io/kubernetes libraries in the Go ecosystem. The issue involves kubernetes nil pointer dereference in kcm after v1 hpa patch request. Remediation is available by upgrading affected packages to version 1.27.0-alpha.1.

CVE-2024-0793 at a Glance

CVE Identifier CVE-2024-0793
GHSA Identifier GHSA-h7wq-jj8r-qm7p
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-20: Improper Input Validation
Affected Product K8s.io/kubernetes
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-0793

To remediate this vulnerability, upgrade all affected K8s.io/kubernetes dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

k8s.io/kubernetes fixed: 1.27.0-alpha.1
Upgrade k8s.io/kubernetes to 1.27.0-alpha.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for k8s.io/kubernetes

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-0793, inspect your project dependencies for K8s.io/kubernetes:

inspect dependencies for k8s.io/kubernetes

Analyze the terminal output to locate any version of K8s.io/kubernetes in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.27.0-alpha.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In K8s.io/kubernetes, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A flaw was found in kube-controller-manager. This issue occurs when the initial application of a HPA config YAML lacking a .spec.behavior.scaleUp block causes a denial of service due to KCM pods going into restart churn.

CVE-2024-0793 Affected K8s.io/kubernetes Versions

1 component(s)
Fixed Versions:
1.27.0-alpha.1
Product / Package Ecosystem Affected Versions Fixed Version
k8s.io/kubernetes
Go
< 1.27.0-alpha.1
1.27.0-alpha.1

References

Frequently Asked Questions

What is CVE-2024-0793?
CVE-2024-0793 is a security vulnerability in K8s.io/kubernetes involving Kubernetes Nil pointer dereference in KCM after v1 HPA patch request under CWE-20: Improper Input Validation.
Which K8s.io/kubernetes versions are affected?
Affected versions include releases prior to 1.27.0-alpha.1 across affected packages: k8s.io/kubernetes.
What version fixes CVE-2024-0793?
Upgrading to 1.27.0-alpha.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is k8s.io/kubernetes affected?
Yes, k8s.io/kubernetes is affected in releases prior to 1.27.0-alpha.1. Upgrade your dependency to 1.27.0-alpha.1 or later.
What is the CVSS score of CVE-2024-0793?
CVE-2024-0793 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2024-0793?
CVE-2024-0793 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Go dependencies for CVE-2024-0793?
Run the dependency tree command: 'inspect dependencies for k8s.io/kubernetes'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h7wq-jj8r-qm7p",
  "modified" : "2024-11-19T20:25:29Z",
  "published" : "2024-11-17T12:30:29Z",
  "aliases" : [ "CVE-2024-0793" ],
  "summary" : "Kubernetes Nil pointer dereference in KCM after v1 HPA patch request",
  "details" : "A flaw was found in kube-controller-manager. This issue occurs when the initial application of a HPA config YAML lacking a .spec.behavior.scaleUp block causes a denial of service due to KCM pods going into restart churn.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.27.0-alpha.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-0793"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/issues/107038#issuecomment-1911327145"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openshift/kubernetes/pull/1876"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:0741"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:1267"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2024-0793"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2214402"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kubernetes/kubernetes"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3277"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-476" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-18T20:08:13Z",
    "nvd_published_at" : "2024-11-17T11:15:06Z"
  }
}