CVE-2023-2728: Bypassing enforce mountable secrets policy imposed by the ServiceAccount admission plugin
A security issue was discovered in Kubernetes where users may be able to launch containers that bypass the mountable secrets policy enforced by the ServiceAccount admission plugin when using ephemeral containers. The policy ensures pods running with a service account may only reference secrets specified in the service account’s secrets field. Kubernetes clusters are only affected if the ServiceAccount admission plugin and the *kubernetes.io/enforce-mountable-secrets* annotation are used together with ephemeral containers. This issue affects kube-apiserver. Clusters are impacted by this vulnerability if: 1. The ServiceAccount admission plugin is used. Most clusters should have this on by default as recommended in https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount 2. The *kubernetes.io/enforce-mountable-secrets* annotation is used by a service account. This annotation is not added by default. 3. Pods using ephemeral containers.
Affected Software
Remediation
Information
Event History
Frequently Asked Questions
What is the vulnerability ID for this issue?
The vulnerability ID for this issue is CVE-2023-2728.
What is the title of this vulnerability?
The title of this vulnerability is 'Users may be able to launch containers that bypass the mountable secrets policy enforced by the ServiceAccount admission plugin when using ephemeral containers'.
What is the severity of CVE-2023-2728?
The severity of CVE-2023-2728 is medium with a severity value of 6.5.
Which versions of Kubernetes are affected by CVE-2023-2728?
Kubernetes versions 1.24.14, 1.25.0 to 1.25.10, 1.26.0 to 1.26.5, and 1.27.0 to 1.27.2 are affected by CVE-2023-2728.
How can the bypass of the mountable secrets policy be fixed?
A fix for the bypass of the mountable secrets policy is not currently available. It is recommended to update to a patched version of Kubernetes when it becomes available.