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.
Created golang-k8s-kubernetes tracking bugs for this issue: Affects: fedora-all [bug 2215201] Created origin tracking bugs for this issue: Affects: fedora-all [bug 2215203]
This issue has been addressed in the following products: Red Hat OpenShift Container Platform 4.14 Via RHSA-2023:5008 https://access.redhat.com/errata/RHSA-2023:5008