First published: Wed May 31 2023(Updated: )
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 <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount">https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#serviceaccount</a> 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.
Credit: jordan@liggitt.net jordan@liggitt.net
Affected Software | Affected Version | How to fix |
---|---|---|
Kubernetes Kubernetes | <=1.24.14 | |
Kubernetes Kubernetes | >=1.25.0<=1.25.10 | |
Kubernetes Kubernetes | >=1.26.0<=1.26.5 | |
Kubernetes Kubernetes | >=1.27.0<=1.27.2 | |
redhat/kube-apiserver | <1.27.3 | 1.27.3 |
redhat/kube-apiserver | <1.26.6 | 1.26.6 |
redhat/kube-apiserver | <1.25.11 | 1.25.11 |
redhat/kube-apiserver | <1.24.15 | 1.24.15 |
To mitigate this vulnerability, upgrade Kubernetes: https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#upgrading-a-cluster https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#upgrading-a-cluster
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID for this issue is CVE-2023-2728.
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'.
The severity of CVE-2023-2728 is medium with a severity value of 6.5.
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.
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.