CVE-2023-2431: K8s.io/kubernetes Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-xc8m-28vv-4pjc
CVSS 4.4
CWE-1287
Published
Advisory Summary

CVE-2023-2431 is a MODERATE (CVSS 4.4) remote code execution vulnerability (CWE-1287: Improper Validation of Specified Type of Input) affecting K8s.io/kubernetes libraries in the Go ecosystem. The issue involves kubelet vulnerable to bypass of seccomp profile enforcement. Remediation is available by upgrading affected packages to version 1.24.14, 1.25.10, 1.26.5, 1.27.2.

CVE-2023-2431 at a Glance

CVE Identifier CVE-2023-2431
GHSA Identifier GHSA-xc8m-28vv-4pjc
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-1287: Improper Validation of Specified Type of Input
Affected Product K8s.io/kubernetes
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2023-2431

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.24.14
Upgrade k8s.io/kubernetes to 1.24.14
k8s.io/kubernetes fixed: 1.25.10
Upgrade k8s.io/kubernetes to 1.25.10
k8s.io/kubernetes fixed: 1.26.5
Upgrade k8s.io/kubernetes to 1.26.5
k8s.io/kubernetes fixed: 1.27.2
Upgrade k8s.io/kubernetes to 1.27.2
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-2023-2431, 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.24.14), 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-1287: Improper Validation of Specified Type of Input, where the product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type. 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 security issue was discovered in Kubelet that allows pods to bypass the seccomp profile enforcement. Pods that use localhost type for seccomp profile but specify an empty profile field, are affected by this issue. In this scenario, this vulnerability allows the pod to run in unconfined (seccomp disabled) mode. This bug affects Kubelet.

CVE-2023-2431 Affected K8s.io/kubernetes Versions

4 component(s)
Fixed Versions:
1.24.141.25.101.26.51.27.2
Product / Package Ecosystem Affected Versions Fixed Version
k8s.io/kubernetes
Go
< 1.24.14
1.24.14
k8s.io/kubernetes
Go
≥ 1.25.0
< 1.25.10
1.25.10
k8s.io/kubernetes
Go
≥ 1.26.0
< 1.26.5
1.26.5
k8s.io/kubernetes
Go
≥ 1.27.0
< 1.27.2
1.27.2

References

Frequently Asked Questions

What is CVE-2023-2431?
CVE-2023-2431 is a security vulnerability in K8s.io/kubernetes involving Kubelet vulnerable to bypass of seccomp profile enforcement under CWE-1287: Improper Validation of Specified Type of Input.
Which K8s.io/kubernetes versions are affected?
Affected versions include releases prior to 1.24.14, 1.25.10, 1.26.5, 1.27.2 across affected packages: k8s.io/kubernetes.
What version fixes CVE-2023-2431?
Upgrading to 1.24.14, 1.25.10, 1.26.5, 1.27.2 (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.24.14, 1.25.10, 1.26.5, 1.27.2. Upgrade your dependency to 1.24.14, 1.25.10, 1.26.5, 1.27.2 or later.
What is the CVSS score of CVE-2023-2431?
CVE-2023-2431 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2023-2431?
CVE-2023-2431 is classified under CWE-1287: Improper Validation of Specified Type of Input (The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.).
How can I check Go dependencies for CVE-2023-2431?
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-xc8m-28vv-4pjc",
  "modified" : "2024-12-12T19:11:51Z",
  "published" : "2023-06-16T09:30:24Z",
  "aliases" : [ "CVE-2023-2431" ],
  "summary" : "Kubelet vulnerable to bypass of seccomp profile enforcement",
  "details" : "A security issue was discovered in Kubelet that allows pods to bypass the seccomp profile enforcement. Pods that use localhost type for seccomp profile but specify an empty profile field, are affected by this issue. In this scenario, this vulnerability allows the pod to run in unconfined (seccomp disabled) mode. This bug affects Kubelet.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.24.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.25.0"
      }, {
        "fixed" : "1.25.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.26.0"
      }, {
        "fixed" : "1.26.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "k8s.io/kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.27.0"
      }, {
        "fixed" : "1.27.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-2431"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/issues/118690"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/pull/117020"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/pull/117116"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/pull/117117"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/pull/117118"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/pull/117147"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kubernetes/kubernetes"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/kubernetes-security-announce/c/QHmx0HOQa10"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/43HDSKBKPSW53OW647B5ETHRWFFNHSRQ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBX4RL4UOC7JHWWYB2AJCKSUM7EG5Y5G"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2023-1864"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-16T19:42:18Z",
    "nvd_published_at" : "2023-06-16T08:15:08Z"
  }
}