CVE-2024-10220: K8s.io/kubernetes Kubernetes Kubelet Arbitrary Command Execution Vulnerability

HIGH
Advisory Identifier: GHSA-27wf-5967-98gx
CVSS 8.1
CWE-22
Published
Advisory Summary

CVE-2024-10220 is a HIGH (CVSS 8.1) kubernetes kubelet arbitrary command execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting K8s.io/kubernetes libraries in the Go ecosystem. The issue involves kubernetes kubelet arbitrary command execution. Remediation is available by upgrading affected packages to version 1.28.12, 1.29.7, 1.30.3.

CVE-2024-10220 at a Glance

CVE Identifier CVE-2024-10220
GHSA Identifier GHSA-27wf-5967-98gx
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product K8s.io/kubernetes
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

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:U/C:H/I:H/A:N).

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

How to Fix CVE-2024-10220

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.28.12
Upgrade k8s.io/kubernetes to 1.28.12
k8s.io/kubernetes fixed: 1.29.7
Upgrade k8s.io/kubernetes to 1.29.7
k8s.io/kubernetes fixed: 1.30.3
Upgrade k8s.io/kubernetes to 1.30.3
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-10220, 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.28.12), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

The Kubernetes kubelet component allows arbitrary command execution via specially crafted gitRepo volumes.This issue affects kubelet: through 1.28.11, from 1.29.0 through 1.29.6, from 1.30.0 through 1.30.2.

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

3 component(s)
Fixed Versions:
1.28.121.29.71.30.3
Product / Package Ecosystem Affected Versions Fixed Version
k8s.io/kubernetes
Go
< 1.28.12
1.28.12
k8s.io/kubernetes
Go
≥ 1.29.0
< 1.29.7
1.29.7
k8s.io/kubernetes
Go
≥ 1.30.0
< 1.30.3
1.30.3

References

Frequently Asked Questions

What is CVE-2024-10220?
CVE-2024-10220 is a security vulnerability in K8s.io/kubernetes involving Kubernetes kubelet arbitrary command execution under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which K8s.io/kubernetes versions are affected?
Affected versions include releases prior to 1.28.12, 1.29.7, 1.30.3 across affected packages: k8s.io/kubernetes.
What version fixes CVE-2024-10220?
Upgrading to 1.28.12, 1.29.7, 1.30.3 (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.28.12, 1.29.7, 1.30.3. Upgrade your dependency to 1.28.12, 1.29.7, 1.30.3 or later.
What is the CVSS score of CVE-2024-10220?
CVE-2024-10220 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-10220?
CVE-2024-10220 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2024-10220?
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-27wf-5967-98gx",
  "modified" : "2024-12-13T21:45:44Z",
  "published" : "2024-11-22T21:32:15Z",
  "aliases" : [ "CVE-2024-10220" ],
  "summary" : " Kubernetes kubelet arbitrary command execution",
  "details" : "The Kubernetes kubelet component allows arbitrary command execution via specially crafted gitRepo volumes.This issue affects kubelet: through 1.28.11, from 1.29.0 through 1.29.6, from 1.30.0 through 1.30.2.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.28.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.29.0"
      }, {
        "fixed" : "1.29.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.30.0"
      }, {
        "fixed" : "1.30.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-10220"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/issues/128885"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/commit/1ab06efe92d8e898ca1931471c9533ce94aba29b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kubernetes/kubernetes"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/kubernetes-security-announce/c/ptNgV5Necko"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3286"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/11/20/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-22T22:50:21Z",
    "nvd_published_at" : "2024-11-22T17:15:06Z"
  }
}